question

Josh Cooke avatar image
Josh Cooke asked

Implementing LWA in a C# Steam app. Stuck trying to use access token.

Been struggling my way through this with no SDK and no real documentation - only the TV & Other Device docs.

Requesting a code and polling for an access token went well.

However I'm now on STEP 5 of this guide (https://developer.amazon.com/docs/login-with-amazon/customer-profile-other-platforms-cbl-docs.html) and the format is very different to the previous steps.

I gather the endpoint is

"https://api.amazon.com/user/profile"

but it's not happy with any fields I try to give it (trying each of these one at a time)

form.AddField( "access_token", token );
form.AddField( "x-amz-access-token", token );
form.AddField( "Authorization", "bearer " + token );

They all give me the same response of

<UnknownOperationException/>
HTTP/1.1 404 Not Found

Anyone know what I'm doing wrong?

Thanks,

Josh

login with amazon
10 |3000 characters needed characters left characters exceeded

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

1 Answer

Josh Cooke avatar image
Josh Cooke answered

The answer was simply that for the previous steps a POST is needed but for retrieving profile info a GET should be used.

10 |3000 characters needed characters left characters exceeded

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