Version:

Version:

Version:

Version:


Table of Contents

Online Help

Get Refresh Token

Get the FortiCWP OAuth 2.0 bearer refresh token using short-lived access token without using credentials. You need to provide refresh token from the response body of Get Credentials Token.

URL

/api/v1/auth/token/refresh

Method: POST

Request Header

Key

Value

Type

Description

Content-Type application/x-www-form-urlencoded String  

Request Body Parameters

Name Required Value Description
grant_type Required refresh_token  

refresh_token

Required

<4WnuRUY0xHEsoNMDvm>

Refresh token variable from get access token response.

Sample Request

Request URL

POST https://www.forticwp.com/api/v1/auth/token/refresh

Request Header

Content-Type: application/x-www-form-urlencoded

Request Body

grant_type: refresh_token

refresh_token: I4WnuRUY0xHEsoNMDvmurq_J45VHyuxa4DRWq5mevlYB1YT1yL2TUAA8vRRN0

HTTP

POST /api/v1/auth/token/refresh HTTP/1.1

Host: www.forticwp.com

Content-Type: application/x-www-form-urlencoded

Content-Type: application/x-www-form-urlencoded

grant_type=refresh_token&refresh_token=I4WnuRUY0xHEsoNMDvmurq_J45VHyuxa4DRWq5mevlYB1YT1yL2TUAA8vRRNNyO0

Response Variables

Name

Type

Description

access_token String Access token
token_type String Type of token

expires

String

Timestamp of when the token will expire

Sample Response

{

"token_type": "bearer",

"expires": 1.585002361532E12,

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciiRkNXUCJdLCY7RGkrRn6hvfqCbPF9LGNchYGMiEIK2WljPqSbffsk0"

}

 

 

 

 

 

Get Refresh Token

Get the FortiCWP OAuth 2.0 bearer refresh token using short-lived access token without using credentials. You need to provide refresh token from the response body of Get Credentials Token.

URL

/api/v1/auth/token/refresh

Method: POST

Request Header

Key

Value

Type

Description

Content-Type application/x-www-form-urlencoded String  

Request Body Parameters

Name Required Value Description
grant_type Required refresh_token  

refresh_token

Required

<4WnuRUY0xHEsoNMDvm>

Refresh token variable from get access token response.

Sample Request

Request URL

POST https://www.forticwp.com/api/v1/auth/token/refresh

Request Header

Content-Type: application/x-www-form-urlencoded

Request Body

grant_type: refresh_token

refresh_token: I4WnuRUY0xHEsoNMDvmurq_J45VHyuxa4DRWq5mevlYB1YT1yL2TUAA8vRRN0

HTTP

POST /api/v1/auth/token/refresh HTTP/1.1

Host: www.forticwp.com

Content-Type: application/x-www-form-urlencoded

Content-Type: application/x-www-form-urlencoded

grant_type=refresh_token&refresh_token=I4WnuRUY0xHEsoNMDvmurq_J45VHyuxa4DRWq5mevlYB1YT1yL2TUAA8vRRNNyO0

Response Variables

Name

Type

Description

access_token String Access token
token_type String Type of token

expires

String

Timestamp of when the token will expire

Sample Response

{

"token_type": "bearer",

"expires": 1.585002361532E12,

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciiRkNXUCJdLCY7RGkrRn6hvfqCbPF9LGNchYGMiEIK2WljPqSbffsk0"

}