question

playus11 avatar image
playus11 asked

About RedeemGooglePlayInventoryItems

We have a problem to use the RedeemGooglePlayInventoryItems method of Economy v2.

This is the PlayFab error message when calling the method. [An unexpected error occured while processing the request.Unauthorized access. Service URI: https://command.prod.inventory.playfab.com/api/v1/Marketplace/RedeemGooglePlayMainServerClientId: 4c9bf42a-d39e-44ef-8fdb-83cfef7be8c2MainServerCertificateSubjectName: aadclient.mainserver.azuregaming.xboxlive.com]

Of course, we input a service account key correctly in Game Manager.

Also, we checked the API is actually called in my service account and always failed.

I suspect the reason is API key.

Recently, Google Play Developer API updated the things about API access to Google Play Console.

The document was updated about 2 weeks ago. (https://developers.google.com/android-publisher/getting_started)

Google Play Console no longer requires an API key from Google Cloud and does not provide the API access page.

We followed the new document correctly about configuring a service account and giving authorities in Play Console, but the redeem method throws "unauthorized access" error.

We cannot register API key to the Play Console, because the "API access" page was closed.

I think the RedeemGooglePlayInventoryItems method is requiring the API key internally, so the method is always failed when there is no API key.

Please check about this problem.

apis
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Xiao Zha avatar image Xiao Zha commented ·

I will do some research.

0 Likes 0 ·
playus11 avatar image playus11 Xiao Zha commented ·

Ok, thank you.

0 Likes 0 ·
kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

After investigating a bit more, I understand the error. It's not an error on our side, but we'll update the message to be clearer.

The error is saying that you haven't authorized the service account you configured in the Add-On correctly in your Google Play Console. You can find directions on how to do that here.

https://developers.google.com/android-publisher/getting_started#service-account

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

playus11 avatar image playus11 commented ·

Thank you for your response.

It didn't work yesterday, but it works today.

Maybe it needs enough time after granting authorization in Play Console.

But, now we encountered another problem.

The RedeemGooglePlayInventoryItems API succeeds, however, each result of "Succeeded" and "Failed" is an empty list.

Also, the "TransactionIds" is null.

We are validating a test receipt of Google Play, and it is not for subscription items.

Is this the expected outcome for test receipts?

0 Likes 0 ·
playus11 avatar image playus11 playus11 commented ·

Now, we can receive successful responses.

Maybe it's because we verified the test receipt a day after the payment was made.

If we call Redeem API immediately right after payment, we can receive "Succeeded" result.

Don't care about it. Thank you!

0 Likes 0 ·
kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

This is an error in the PlayFab services. We're investigating. I'll let you know when it's patched.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.