Grant Type Refresh

POST https://restapi.actonsoftware.com/token

The grant type refresh will return a new access token and a new refresh token.

  1. access_token - Store the returned access token in your application to authenticate the other endpoint requests. The access token expires after 3600 seconds.
  2. refresh_token - Password or Code grant types are limited to 5 authentication attempts per hour. Using the refresh token workflow avoids unneeded access token requests and prevents your application from reaching this limit. The refresh token does not expire until a new token is requested via any of the Grant Type calls.

Parameters

Name Parameter
Type
Allow
Multiple
Required/
Optional
Data Type Description
grant_type x-www-form-urlencoded False Required string Value must be 'refresh_token'.
client_id x-www-form-urlencoded False Required string The Client ID you received in your welcome email.
client_secret x-www-form-urlencoded False Required string The Client Secret you received in your welcome email.
refresh_token x-www-form-urlencoded False Required string The refresh_token received in the previous authentication or refresh request.

Response

{
  "access_token": "12345678-9abc-defg-hijk-lmnopqrs",
  "refresh_token": "12345678-9abc-defg-hijk-lmnopqrs",
  "scope": "default",
  "token_type": "Bearer",
  "expires_in": 3600
}

 

Code Examples

cURLPythonnodeJS

curl -X POST https://restapi.actonsoftware.com/token -d 'grant_type=refresh_token&client_id=123456789abcdefghijklmnopqrs&client_secret=123456789abcdefghijklmnopqrs&refresh_token=123456789abcdefghijklmnopqrs'

import requests

url = "https://restapi.actonsoftware.com/token"

payload = 'grant_type=refresh_token&client_id=123456789abcdefghijklmnopqrs&client_secret=123456789abcdefghijklmnopqrs&refresh_token=123456789abcdefghijklmnopqrs'
headers = {
  'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data = payload)

print(response.text.encode('utf8'))

var request = require("request");

var options = { 

  method: 'POST',
  url: 'https://restapi.actonsoftware.com/token',
  
  form: 
   { grant_type: 'refresh_token',
     client_id: '123456789abcdefghijklmnopqrs',
     client_secret: '123456789abcdefghijklmnopqrs',
     refresh_token: '123456789abcdefghijklmnopqrs' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});