Getting OAuth2 Credentials
Before you can start the flow, register your application to receive aclient_id and client_secret.
Go to Settings → Developer → OAuth2 Clients in your Bkmark account and create a new client. You will need to provide:
- A display name for your application
- One or more allowed redirect URIs (exact match required)
- The scopes your application plans to request
The Authorization Flow
Revoking Tokens
When a user disconnects your application, revoke their refresh token so Bkmark can clean up the session and the token can no longer be used:string
required
The access token or refresh token to revoke.
string
access_token or refresh_token. Optional but helps Bkmark look up the token faster.string
required
Your application’s client ID.
string
required
Your application’s client secret.
200 OK per RFC 7009, even if the token was already expired or revoked.
Token Introspection
To check whether a token is still active — for example, before making a batch of API calls — query the introspection endpoint:boolean
true if the token is valid and has not expired or been revoked.string
Space-separated scopes granted to this token.
string
The client ID that was issued this token.
string
The Bkmark user ID this token acts on behalf of.
string (ISO 8601)
UTC timestamp when the access token expires.
Security Checklist
- Never expose your
client_secretin client-side JavaScript, mobile app binaries, or source control. - Always validate
statein the callback before processing the authorization code. - Use PKCE for SPAs and mobile apps, which cannot keep a
client_secretconfidential. - Store tokens securely — use encrypted storage or a secrets manager, never cookies without
HttpOnly/Secureflags orlocalStorage. - Implement automatic token refresh so users aren’t interrupted when access tokens expire.
- Revoke tokens on disconnect — always call
POST /oauth/revokewhen a user unlinks your app. - Request only the scopes you need — see the Scopes reference for guidance on minimal scope sets.