Rahul avatar image
Rahul asked

getting AUTH_TOKEN_VERIFICATION_FAILURE: null: null amazon in app purchase fire stick tv

I am trying to implement amazon's in app purchase(IAP) in my application. I followed the below article to implement it.

But I am receiving below error when I am calling PurchasingService.purchase(MySku.MY_MAGAZINE_SUBS.getSku()); AUTH_TOKEN_VERIFICATION_FAILURE: null: null        at        at        at        at$        at android.os.Handler.handleCallback(        at android.os.Handler.dispatchMessage(        at android.os.Looper.loop(        at

public enum MySku {     //The only subscription product used in this sample app    MY_MAGAZINE_SUBS("com.subscription.annually", "US");     private final String sku;    private final String availableMarkpetplace;     /**     * Returns the Sku string of the MySku object     *     * @return     */    public String getSku() {        return this.sku;    }     /**     * Returns the Available Marketplace of the MySku object     *     * @return     */    public String getAvailableMarketplace() {        return this.availableMarkpetplace;    }     private MySku(final String sku, final String availableMarkpetplace) {        this.sku = sku;        this.availableMarkpetplace = availableMarkpetplace;    }     /**     * Returns the MySku object from the specified Sku and marketplace value.     *     * @param sku     * @param marketplace     * @return     */    public static MySku fromSku(final String sku, final String marketplace) {        if (MY_MAGAZINE_SUBS.getSku().equals(sku) && (null == marketplace || MY_MAGAZINE_SUBS.getAvailableMarketplace()                .equals(marketplace))) {            return MY_MAGAZINE_SUBS;        }        return null;    } 

Please help!!!

iapfire tvamazon pay
1 comment
10 |5000

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

I am having the same issue! running in production mode nothing is working for me. All requests (userData, getPurchaseUpdates and other) return RequestStatus = FAILED and I see exactly the same issue in my logs: AUTH_TOKEN_VERIFICATION_FAILURE: null: null

1 Like 1 ·
Levon@Amazon avatar image
Levon@Amazon answered

Hi there,

AUTH_TOKEN_VERIFICATION_FAILURE generally happens when Appstore SDK is not able to verify the Authentication token sent from Amazon servers. This generally happens when Public key (PEM file) is not available in the App. Kindly follow the steps mentioned in to configure the key. Thanks!

10 |5000

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

I have configured the key according the guide. If you don't do that you'll get different error:

D/Kiwi: AbstractCommandTask: Exception occurred while processing task: DATA_AUTH_KEY_LOAD_FAILURE: CERT_NOT_FOUND: null DATA_AUTH_KEY_LOAD_FAILURE: CERT_NOT_FOUND: null

You'll get this error if remove AppstoreAuthenticationKey.pem from assets folder.

0 Likes 0 ·
Pradeep avatar image Pradeep Andrei Viarshadau ·

@Andrei Viarshadau I'm also having the same issue. ( AUTH_TOKEN_VERIFICATION_FAILURE: null: null.) Did you find any solution?

0 Likes 0 ·
allentown avatar image
allentown answered

Did you solve it?I also encountered the same problem

1 comment
10 |5000

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

No, still not resolved. Currently I've postponed the update to new sdk.

0 Likes 0 ·
Andrei Viarshadau avatar image
Andrei Viarshadau answered

So, after lots of investigation I finally made it working!

Here what you need to know, to make Production mode working:

1) It only works in Life App Testing! So Production mode will work only for apk that was downloaded from the store during LAT.

2) Make sure, that your AppstoreAuthenticationKey.pem is up to date. I my case for some reason it has changed after I initially downloaded it.

3) Follow other documentation guides.

As for @Rahul original question - I think you are trying to test in Production mode locally with you debug build. It will not work! You should test locally in Sandbox mode using App Tester User Guide

10 |5000

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