OAuth apps
Act on other customers' accounts with the authorization code flow and PKCE.
Building something other 360Nook customers install? Register it under Settings → Developer apps, then run the authorization code flow with PKCE.
- Send the customer to
/oauth/authorizewith yourclient_id, an exact registeredredirect_uri,scope,stateand an S256code_challenge. - They approve, and we redirect back with a
codeand yourstate, untouched. - Exchange it at
POST /api/oauth/tokenfor an access and refresh token.
curl -X POST https://app.360nook.com/api/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "authorization_code",
"client_id": "nook_app_...",
"client_secret": "nook_cs_...",
"code": "<from the redirect>",
"redirect_uri": "https://your-app.com/oauth/callback",
"code_verifier": "<the PKCE verifier>"
}'Refresh tokens rotate. If a rotated refresh token is presented again we revoke the whole grant, because we cannot tell a replay from a leak — store the newest one you were given and discard the old.
Redirect URIs are matched exactly — never by prefix, never with a wildcard. Prefix matching is how an authorization code ends up delivered to an attacker’s path on an otherwise legitimate host.