Authorization API
The Notehub authorization API contains endpoints to generate authentication tokens for use with other Notehub API requests.
OAuth Bearer Tokens are no longer the recommended way to authenticate with the Notehub API. New integrations should use Personal Access Tokens instead, which offer simpler setup, configurable expiration, and the ability to suspend or revoke individual tokens without affecting other integrations.
| Name | HTTP Request |
|---|---|
| Generate OAuth Token | POST /oauth2/token |
Generate OAuth Token Notehub
Generate an OAuth bearer token that can be used to authenticate subsequent Notehub API requests.
| HTTP Method: | POST |
| URL: | https://api.notefile.net/oauth2/token |
grant_type
string
This argument must be set to "client_credentials".
client_id
string
The client ID of an OAuth Client registered on the Notehub project. See here for details.
client_secret
string
The client secret of an OAuth Client registered on the Notehub project. See here for details.
curl -X POST
-L 'https://api.notefile.net/oauth2/token'
-H 'content-type: application/x-www-form-urlencoded'
-d grant_type=client_credentials
-d client_id=your-client-id
-d client_secret=your-client-secretResponse Members
access_token
string
The string OAuth bearer token. This is the value you’ll want to save for use in subsequent Notehub API requests.
expires_in
integer
The number of seconds until the access token expires.
token_type
string
The type of token returned. Currently this will always be set to "bearer".
{
"access_token": "abc123...",
"expires_in": 1799,
"token_type": "bearer"
}