Using OAuth 2.0 for Service Applications
...
Parameter | Values | Description |
---|---|---|
grant_type | client_credentials | This must be client_credentials. |
scope | The permissions your application requests. | A scope is used to convey what permissions your application requires when requesting permission from the end-user. Current available scopes are:
Scope resources can be any of our endpoints. For example, companies, contacts or issues. The scope can be concatenated and delimited by a comma. For example:
|
Here is what a request may look like, where the client id and secret are encoded using base-64.
...
Info |
---|
The request must authenticate using HTTP basic. The format is |
For example,
Code Block | ||
---|---|---|
| ||
POST /oauth2/v0/token HTTP/1.1 Host: hq.api.accelo.com Content-Type: application/x-www-form-urlencoded Authorization: Basic {client_id}:{client_secret}NzY1NzVmYzJAaHEuYWNjZWxvLmNvbTpSYWp3MGFhc0g1YUU1X2lDbTc= grant_type=client_credentials |
For example, using curl expecting a JSON response
For this example client_id and client_secret are not encoded.
Code Block |
---|
curl \ -u {client_id}:{client_secret} \ --data "grant_type=client_credentials" \ "https://{deployment}.api.accelo.com/oauth2/v0/token.json" |
...