Authentication
Create an access token
Generate a short-lived Public API access token for a server-to-server API client.
Overview
Use this endpoint to exchange an API client ID and client secret for a Public API access token. Send the client credentials with HTTP Basic authentication and request only the scopes needed by the integration. Access tokens expire after 30 minutes. It uses http basic client authentication.
/oauth2/tokencURL
POSTcurl --request POST \ --url 'https://crm.notifyy.io/oauth2/token' \ --header 'Authorization: Basic base64(client_id:client_secret)' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data 'grant_type=client_credentials&scope=templates%3Awrite'Sample Request Body
grant_type=client_credentials&scope=templates%3AwriteSample Response
{ "access_token": "eyJraWQiOiJub3RpZnl5LXB1YmxpYy1hcGkta2V5LTEiLCJhbGciOiJSUzI1NiJ9...", "token_type": "Bearer", "expires_in": 1800, "scope": "templates:write"}Status Codes
| Code | Description |
|---|---|
| 200 | Access token was issued. |
| 400 | Grant type, scope, or form data is invalid. |
| 401 | Client authentication failed. |
Headers
HTTP Basic credentials using base64(client_id:client_secret).
Example: Basic base64(client_id:client_secret)
Form URL encoded request body.
Example: application/x-www-form-urlencoded
| Object | Description |
|---|---|
Authorization string | RequiredHTTP Basic credentials using base64(client_id:client_secret). Example: Basic base64(client_id:client_secret) |
Content-Type string | RequiredForm URL encoded request body. Example: application/x-www-form-urlencoded |
Request body
OAuth grant type. Notifyy Public API supports client_credentials for this endpoint.
Example: client_credentials
Space-delimited scopes requested for the access token. The API client must already be allowed to use each requested scope.
Example: templates:write
| Object | Description |
|---|---|
grant_type string | RequiredOAuth grant type. Notifyy Public API supports client_credentials for this endpoint. Example: client_credentials |
scope string | RequiredSpace-delimited scopes requested for the access token. The API client must already be allowed to use each requested scope. Example: templates:write |
Response fields
Access token used in the Authorization header for Public API requests.
Token type returned by the OAuth server.
Example: Bearer
Token lifetime in seconds. Default is 1800 seconds, which is 30 minutes.
Example: 1800
Scopes granted to the issued access token.
Example: templates:write
| Object | Description |
|---|---|
access_token string | Access token used in the Authorization header for Public API requests. |
token_type string | Token type returned by the OAuth server. Example: Bearer |
expires_in integer | Token lifetime in seconds. Default is 1800 seconds, which is 30 minutes. Example: 1800 |
scope string | Scopes granted to the issued access token. Example: templates:write |