The Notehub authorization API contains endpoints to generate authentication tokens for use with other Notehub API requests.
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 from the Programmatic API access section of a Notehub project. See here for details.
client_secret
string
The Client secret from the Programmatic API access section of a Notehub project. See here for details.
curl -X POST
-L 'https://notehub.io/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-secret
Response 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"
}