Fortinet black logo

Online Help

Get Refresh Token

Copy Link
Copy Doc ID cf00dcb1-0886-11ed-bb32-fa163e15d75b:676959

Get Refresh Token

Get the FortiCNP 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.forticnp.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 FortiCNP 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.forticnp.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"

}