Hello everyone,
I am currently working on integrating the Amazon Music API into a device and am facing an issue with the LWA authorization process. I’m hoping someone in
the community or from the Amazon team can point me in the right direction.
My Goal:
To obtain an LWA access token with Music API scopes (e.g., music::library:read) using the standard Authorization Code Grant flow.
The Problem:
When I redirect my user to the LWA authorization URL with scope=music::library:read, the process fails. After the user logs in, they are redirected to an
error page that says “400 Bad Request - An unknown scope was requested”.
What I’ve Tried:
-
Testing the Client ID with a different scope: I tested the exact same Client ID with the Device Authorization Grant flow (/auth/O2/create/codepair)
using scope=alexa:all. This test was successful. This proves that my Client ID is valid and active. -
Verifying the Authorization URL: My authorization URL is structured correctly according to the documentation:
1 https://www.amazon.com/ap/oa?client_id=[MY_CLIENT_ID]&scope=music::library:read&response_type=code&redirect_uri=[MY_REDIRECT_URI]
(My redirect_uri is correctly configured in the Security Profile’s “Allowed Return URLs”.)
My Suspicion:
Based on these tests, I strongly suspect that my Security Profile, while enabled for Alexa services, has not been provisioned or enabled for the Amazon
Music API. Therefore, the authorization server does not recognize any of the music::* scopes for my specific Client ID.
My Question:
- Is my suspicion correct? Is there a specific step required to enable a Security Profile for the Amazon Music API that I might have missed?
- Since the Music API is in a closed beta, is this a common issue for new developers, and what is the standard procedure to get the profile enabled?
Any guidance or help would be greatly appreciated. Thank you!