Amazon Payments (Login with Amazon / Amazon Pay)
pay.amazon.com/ ↗Login with Amazon OAuth is live and self-serve (security profile + privacy URL, ~20–30 min); Amazon Pay money movement is a separate merchant onboarding gate not detailed in these sources.
01Pick your path
02Time & effort
- DEVCreate developer account + security profile5–15 minutessourced[S3][S5]Free account; consent privacy URL is required.
- DEVConfigure website client + redirect URI5–10 minutessourced[S2][S3]Copy Client ID and Client Secret; keep the secret server-side.
- DEVImplement authorize + token exchange10–30 minutessourced[S2]Agent can draft the code; you add real credentials.
- DEVTest consent, refresh, logout10–20 minutessourced[S2][S9]You must click through Amazon consent with a real account; agent can script token tests.
- PRODProduction hardening20–40 minutessourced[S2][S9]No LWA production review is described in the fetched docs.
- PRODAmazon Pay merchant onboarding (if needed)wait 3–21 dayssourced[S1]Duration inferred; not part of LWA OAuth. Could be longer or shorter.
03Steps
Get a working connection
Go to the Login with Amazon console. First-time users create a free Amazon Developer account.
“If this is your first time using the Developer Console, you will be asked to set up an account.” — [S5] verified verbatim
↗ developer.amazon.com/loginwithamazon/console/site/lwa/overview.htmlClick Create a New Security Profile. Enter Name and Description. The Name appears on the consent screen. You must supply a Consent Privacy Notice URL; logo is optional.
“You must enter a Consent Privacy Notice URL for your application.” — [S5] verified verbatim
↗ developer.amazon.com/loginwithamazon/console/site/lwa/overview.htmlAdd the website/app to the profile. Register the HTTPS redirect URI you will use. Copy the Client ID and Client Secret; the secret must stay server-side.
“The Authorization Grant uses the client identifier, but the Authorization Code Grant requires both the client identifier and client secret.” — [S3] verified verbatim
Send the browser to https://www.amazon.com/ap/oa with client_id, scope, response_type=code, redirect_uri, state, code_challenge, and code_challenge_method=S256. Use only the scopes you need.
“To request authorization, the client (website) must redirect the user-agent (browser) to make a secure HTTP call to https://www.amazon.com/ap/oa with the following parameters.” — [S2] verified verbatim
◆ prepared by agent · Authorize URL templatehttps://www.amazon.com/ap/oa?client_id=YOUR_CLIENT_ID&scope=profile%20postal_code&response_type=code&redirect_uri=https%3A%2F%2Fyourapp.example%2Fcallback&state=RANDOM_STATE&code_challenge=BASE64URL_SHA256(CODE_VERIFIER)&code_challenge_method=S256
POST grant_type=authorization_code, code, redirect_uri, client_id, and client_secret to https://api.amazon.com/auth/o2/token (or the EU/FE endpoint). The code expires in 5 minutes.
“An authorization code is valid for 5 minutes.” — [S2] verified verbatim
◆ prepared by agent · Token exchange curlcurl -X POST https://api.amazon.com/auth/o2/token -d grant_type=authorization_code -d code=AUTH_CODE -d redirect_uri=https://yourapp.example/callback -d client_id=YOUR_CLIENT_ID -d client_secret=YOUR_CLIENT_SECRET
Use scope_data JSON to make only business-critical scopes essential; leave postal_code voluntary unless required. This changes what users can uncheck on consent.
“This information is specified using the _scope\_data_ parameter in the authorization request.” — [S7] verified verbatim
Make it production-ready
Refresh tokens start with Atzr|, are valid until the user revokes access, and are only returned in the authorization-code grant when client_secret is supplied. Do not expose them to browser apps.
“Refresh tokens are returned only in the Authorization Code Grant.” — [S9] verified verbatim
If you need payments, review Amazon Pay docs. Amazon Pay is website-only per S1; these sources do not document payment scopes, merchant vetting, or approval time.
↗ pay.amazon.com/
04Requirements, scopes & nuances
You'll need
- ▸Free Amazon Developer account; first-time LWA console users must set one up. sourced ❝[S5][S4]
- ▸Security profile enabled for Login with Amazon. sourced ❝[S3][S5]
- ▸Consent Privacy Notice URL published and entered in the security profile. sourced ❝[S5][S3]
- ▸HTTPS redirect URI registered and used consistently. sourced ❝[S2]
- ▸Client ID plus client secret for the authorization-code grant. sourced ❝[S3][S2]
- ▸PKCE (S256) for browser-based apps; server-side code exchange recommended. sourced ❝[S2]
- ▸For payments, Amazon Pay is website-only in S1 and is not an LWA OAuth scope. inferred[S1]
- ▸Manual endpoint configuration is required because discovery metadata is not published. inferred
Gotchas
- !No OIDC/OAuth discovery metadata was served on api.amazon.com or www.amazon.com (403/404), so auto-discovery libraries will fail. inferred
- !The authorize endpoint returns a text/html “Error Page” with HTTP 400 for an unknown client_id, not a JSON OAuth error. inferred
- !Authorization codes expire in 5 minutes. sourced ❝[S2]
- !Refresh tokens are only returned in the authorization-code grant and only when a client_secret is passed; browser-only apps get no refresh token. sourced ❝[S9][S2]
- !LWA exposes only profile, profile:user_id, and postal_code — no email-only scope and no payment scope. sourced ❝[S6][S2]
- !Amazon Pay is available for websites only; mobile app payment use is not supported per S1. inferred[S1]
- !The consent screen requires a privacy policy URL; missing it blocks security-profile setup. sourced ❝[S5][S3]
- !Seller Central App Console is deprecated; existing LWA apps need account linking or migration. sourced ❝[S1]
| Scope / permission | Tier | Note | Evidence |
|---|---|---|---|
| profile | basic | Name, email, and Amazon account ID. Broadest LWA identity scope. | sourced ❝[S6] |
| profile:user_id | basic | Amazon account ID only; narrowest identity scope. | sourced ❝[S6] |
| postal_code | sensitive | ZIP/postal code from the Amazon account; request as voluntary unless essential. | sourced ❝[S6][S8] |
05If you get blocked
→ Use account linking or contact lwa-migration-support@amazon.com; client ID and secret remain unchanged.
→ Hardcode the authorize endpoint https://www.amazon.com/ap/oa and token endpoint https://api.amazon.com/auth/o2/token (or the EU/FE endpoint).
→ Add a server-side code exchange that supplies client_secret, then store the returned refresh token server-side.
→ Use Amazon Pay separately; LWA only identifies the user. Amazon Pay is website-only per S1 and has separate onboarding.
→ Publish a privacy policy over HTTPS and paste the URL into the Consent Privacy Notice URL field.
→ Use the exact same HTTPS redirect_uri in the authorize request and the token exchange.
06Evidence: what was tested, sourced, and still uncertain
Sources read
- [S1] FAQ | Login with Amazon official
- [S2] Authorization Code Grant | Login with Amazon official
- [S3] Security Profile | Login with Amazon official
- [S4] App and Game Development | Amazon Appstore Developer Portal official
- [S5] Register for Login with Amazon official
- [S6] Use the Login with Amazon SDK for iOS APIs official
- [S7] Requesting Scopes as Essential/Voluntary | Login with Amazon official
- [S8] Essential / Voluntary Scopes | Login with Amazon official
- [S9] Refresh Tokens | Login with Amazon official
- [composio] Composio — Managed OAuth apps directory official
- [probe] Live HTTP probes run by the agent (dummy client_id, no credentials) probe
Still uncertain
- ? Amazon Pay merchant onboarding requirements, supported countries, fees, and approval times are not in the fetched sources; the days–weeks estimate is inferred.
- ? The fetched LWA docs describe self-serve registration but do not state whether any production or distribution review exists for web apps.
- ? Access-token lifetime is not stated; only authorization-code lifetime (5 minutes) and refresh-token validity (indefinite until revoked) are documented.
- ? The exact redirect-URI registration UI and limits are not shown in the fetched pages.
- ? The 403 discovery responses may be bot protection rather than definitive proof that no metadata exists; recheck with a browser/real client.
- ? Whether Amazon Pay uses additional OAuth scopes or entirely separate payment APIs is not documented in these sources.
- ? Generated automatically; no app was registered and no review was submitted.