Fortinet black logo

online help

Get Refresh Token

Get Refresh Token

Description

Get refresh token uses the short-lived refresh token from past access token requests (Get Authorization Token or Get Credentials Token) without having to use credentials or username/password.

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

<Refresh Token>

Refresh token generated from the past Get Authorization Token and Get Credentials Token request responses.

Sample Request

Request URL

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

Request Header

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

Request Body

grant_type: refresh_token

refresh_token: 2j0cAM8yxa4B5kU8GbTrty2kgSD7nfbmYEaPNQ

Response Variable

Name

Type

Description

access_token String Access token returned
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": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6IkFQSSIsImlzcyI6ImZhdXRoLXNlcnZlciIsImhvc3QiOlsiRkNXUCJdLCJleHAiOjE1ODUwMDIzNjEsImFpZCI6InFhLmNhc2IxQGdtYWlsLmNvbSJ9.Y7RGkrRn6hvfqCbPF9LGNchYGMiEIK2WljPqSbffsk0"

}

Get Refresh Token

Description

Get refresh token uses the short-lived refresh token from past access token requests (Get Authorization Token or Get Credentials Token) without having to use credentials or username/password.

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

<Refresh Token>

Refresh token generated from the past Get Authorization Token and Get Credentials Token request responses.

Sample Request

Request URL

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

Request Header

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

Request Body

grant_type: refresh_token

refresh_token: 2j0cAM8yxa4B5kU8GbTrty2kgSD7nfbmYEaPNQ

Response Variable

Name

Type

Description

access_token String Access token returned
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": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6IkFQSSIsImlzcyI6ImZhdXRoLXNlcnZlciIsImhvc3QiOlsiRkNXUCJdLCJleHAiOjE1ODUwMDIzNjEsImFpZCI6InFhLmNhc2IxQGdtYWlsLmNvbSJ9.Y7RGkrRn6hvfqCbPF9LGNchYGMiEIK2WljPqSbffsk0"

}