8

I successfully authenticated to google play developer rest api and I am getting also the refresh token but I can figure out how to make an edit requests. I have method signature at the following link:

https://developers.google.com/android-publisher/api-ref/edits/insert

I added the following header

Authorization:{{token_type}} {{access_token}}

but i cant figure out where to put the package name:

POST https://www.googleapis.com/androidpublisher/v2/applications/packageName/edits

I putted packageName like above using get and also as post parameter and in both cases i am encountered "404 not found" error. Please help.

aurelianr
  • 538
  • 2
  • 12
  • 35
  • https://developers.google.com/android-publisher/api-ref/edits/insert documentation says to supply the app id in place of packageName placeholder. Have you tried following the documentation? – Oleg Estekhin Aug 16 '17 at 14:12
  • I followed the documentation but i cant figure out how to make the request. – aurelianr Aug 16 '17 at 17:30

2 Answers2

2

You can try

POST https://www.googleapis.com/androidpublisher/v2/applications/edits?id = packageid && expiryTimeSeconds = 20

GET https://www.googleapis.com/androidpublisher/v2/applications/**packageName**/edits/**editId**

according to https://developers.google.com/android-publisher/api-ref/edits#methods

artgb
  • 3,177
  • 6
  • 19
  • 36
2

Please verify if you have followed all steps for authentication and authorization as shown here.

Since you are not getting 401 or 403, you might be sending the token correctly.

To call the api:

put your package name as a path paramters and specify the edit resource in the body. Please note that the edit resource is ignored but needs to be provided.

send your request like this:

POST https://www.googleapis.com/androidpublisher/v2/applications/yourPackageNameHere/edits

in the body:

{
  "id": "abcd",
  "expiryTimeSeconds": "asd"
}

make sure u provide content type in header as well. Authorization is also required in the headers as you mentioned.

Hope this helps. :)

Nikit Prabhu
  • 131
  • 4