I want to retrieve all my reviews of an app using reviews.list, a google developers API for extracting all reviews of an app from google play store.
When I try, I am getting empty response even though I have around 10 reviews in my app and this is the statusCode: 200 and statusMessage: 'OK',
But I am able to extract a review using reviews.get which indicates the bearer token and 0auth are all good and have got permissions too.
If anybody can help me out or can send a sample curl, it would be very helpful.
Here is my code
import axios from "axios";
const tokens = {
"access_token": "12345access_token",
"expires_in": 3548,
"scope": "https://www.googleapis.com/auth/androidpublisher",
"token_type": "Bearer"
};
const totalReviews = 1000;
const paginateNumCount = 150;
const packageName = 'package_name';
try{
let devrevReviews = await axios.get(`https://androidpublisher.googleapis.com/androidpublisher/v3/applications/${packageName}/reviews`,{
headers : {
Authorization : 'Bearer '+tokens.access_token
},
});
console.log('devrevReviews', devrevReviews);
console.log('devrevReviews', devrevReviews.data);
} catch(error) {
console.error('Error fetching reviews:', error.message);
}