Grant-Type Code

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.

ParameterParameter TypeData TypeDescription
grant_typequerystringThe value must be set to 'authorization_code'
client_idquerystringThe Client ID found in your Act-On account.
client_secretquerystringThe Client Secret found in your Act-On account.
codequerystringThe value from the callback URL code parameter.
redirect_uriquerystringThe 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
}