Connect an app
- Your app generates a random code verifier and its SHA-256 code challenge. This is called PKCE.
- It opens
/oauth/authorizein a browser with the parameters below. - You review the permissions, enter your API key on that page and choose Connect app.
- The browser returns to the registered callback with a one-time code, your state value and iss. Your app checks that state matches and the issuer is
https://api.alexxweb.com. - Your app exchanges the code and original verifier for tokens.
Use a verifier of 43–128 URL-safe characters. S256 PKCE is required for public and confidential apps.
Try it
After approval, a public app exchanges its code like this. Replace every placeholder with the values from that same connection attempt.-u "CLIENT_ID:CLIENT_SECRET". Keep that secret on its server.
What you’ll see
- access_token works in
Authorization: Bearer ACCESS_TOKEN. - expires_in is its lifetime in seconds: up to 15 minutes.
- refresh_token gets a replacement access token. Save it privately.
Refresh access
Server apps
A confidential app can useclient_credentials for its own approved permissions:
Other requests
Revoke a public app’s refresh token with form fields
token=REFRESH_TOKEN and client_id=CLIENT_ID. A confidential app also uses HTTP Basic authentication. Revoking a refresh token removes the connection’s access tokens too.
Token requests use form data. OAuth failures use error and error_description, such as invalid_grant for an expired code.