Skip to content
bkmark.it
Docs menu

API reference

OAuth

The authorization server for apps that act on someone’s behalf.

get /oauth/authorize

Start an authorization: validates the request, then sends the browser to the consent page.

No credential needed Returns 200

Parameters

Parameters
NameTypeDescription
response_typestring
client_idrequiredstring1–200 characters.
redirect_urirequiredstring1–2,048 characters.
scopestringDefault "". Up to 1,000 characters.
statestringUp to 1,000 characters.
code_challengestringUp to 200 characters.
code_challenge_methodstringUp to 20 characters.

Example

curl 'https://api.bkmark.it/oauth/authorize?client_id=text&redirect_uri=text'

post /oauth/token

Exchange an authorization code or refresh token for tokens.

No credential needed Returns 200

Example

curl -X POST 'https://api.bkmark.it/oauth/token'
Response fields (5)
Response fields
NameTypeDescription
access_tokenrequiredstring
token_typerequiredstringOne of Bearer.
expires_inrequiredinteger-9007199254740991–9007199254740991.
scoperequiredstring
refresh_tokenstring

post /oauth/revoke

Revoke an access or refresh token (RFC 7009; always 200).

No credential needed Returns 200

Example

curl -X POST 'https://api.bkmark.it/oauth/revoke'

get /oauth/token-info

The calling OAuth2 token or API key: its user, scopes, library and expiry.

No credential needed Returns 200

Example

curl 'https://api.bkmark.it/oauth/token-info'
Response fields (7)
Response fields
NameTypeDescription
activerequiredbooleanOne of true.
viarequiredenumOne of oauth, api_key.
clientIdrequiredstring or null
scopesrequiredstring[]
libraryIdrequireduuid or null
expiresAtrequiredstring or null
userrequiredobject
idrequireduuid
emailrequiredstring
namerequiredstring