Always getting 'InvalidTokenException' while token is not modified.

0

I am getting token from aws marketplace when I subscribe to my product from aws marketplace via a test account. But when I call the resolve-customer-api over the token, I get 'InvalidTokenException'.

I tried to resolve token even via CLI but same error.

I had been working perfectly earlier but its not now. By comparing the token to previous one I have realized that the length of previous tokens were 180 but this one has 194.
Here is the body of post request to my page from AWS marketplace.
body: 'x-amzn-marketplace-token=MNEwEjq%2FBGaoLe2mueodq%2BuSzoG6pYX4xR4PO7qGKL7N%2FhQyc0I8DyVcwCTSjLtxddVRZqAnbhPHABHquQ5gKAim0S0z8KhfJfH5Nz9Elaa9uwGKhKM33KpD%2BJMU6MSF%2BFMc2Mv22nQP%2FF0DLgFDXqkBe%2FT262K0Bxj8IHMK07ZW27uuR96A'

I am not sure why am I getting this error.
Thanks,
Faizan

asked 2 years ago42 views
1 Answer
0

The token I received in the body was URL encoded, by decoding it, it works fine.

But still I don't know why is it in body like a string:
body:{
'x-amazon-marketplace-token=xxxxxxxxxxxxxxxxtoken'
}

and not like this:
body:{
'x-amazon-marketplace-token':'xxxxxxxxxxxxxxxxxtoken'
}

Edited by: faizanshah on Jul 25, 2020 1:39 AM

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions