Grant Type Code requests are disabled by default for new developer accounts. If you would like to enable this option, please contact Act-On Support with the callback URL you would like to use.
The grant type code method allows users to authorize your application to connect to their Act-On account and does not require you to store their username and password in your application.
Instead, they will be redirected to a page that requests an authorization. This will generate a one-time code that will be passed to your callback URL.
Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
grant_type | query | string | The value must be set to 'authorization_code' |
client_id | query | string | The Client ID found in your Act-On account. |
client_secret | query | string | The Client Secret found in your Act-On account. |
code | query | string | The value from the callback URL code parameter. |
redirect_uri | query | string | The value must contain the redirect URL you set with Act-On Support. |
Example
The following example URL will send users to the authentication page:
https://api.actonsoftware.com/authorize?scope=PRODUCTION&response_type=code&client_id=12345678-9abc-defg-hijk-lmnopqrs&redirect_uri=https://localhost
Once the user has signed in and authorized the response containing the grant code is sent to your callback URL.
https://localhost/?code=db5b2d1d7c569c6ef8166267ffffff
Your application will then use that code for the code parameter.
Response
{
"access_token":"12345678-9abc-defg-hijk-lmnopqrs",
"refresh_token":"12345678-9abc-defg-hijk-lmnopqrs",
"scope":"offline-access",
"token_type":"Bearer",
"expires_in": 3600
}