Fortinet black logo

Online Help

Get Authorization Token

Copy Link
Copy Doc ID df548089-ec91-11ee-8c42-fa163e15d75b:514586

Get Authorization Token

Description

Get FortiCASB access token by the FortiCASB username and password.

URL

/api/v1/auth/token

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 password

username

Required

<username>

FortiCASB account user name

password

Required

<password>

FortiCASB account password

Sample Request

Request URL

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

Request Header

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

Request Body

grant_type: password

username: XXXXXXXXXX

password: XXXXXXXXXX

Response Variables

Name

Type

Description

access_token String Access token returned
refresh_token String Refresh token returned
token_type String Type of token

expires

String

Timestamp of when the token will expire

Sample Response

{

"token_type": "bearer",

"expires": 1.585002117836E12,

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6IkFQSSIsImlzcyI6ImZhdXRoLXNlcnZlciIsImhvc3QiOlsiRkNXUCJdLCJleHAiOjE1ODUwMDIxMTcsImFpZCI6InFhLmNhc2IxQGdtYWlsLmNvbSJ9.TFfhF3jRDnoj1W96gFOuMnxvAhdwU55IQdO6tpkOpH0",

"refresh_token": "I4WnuRUY0xHEsoNMDvmurq_J45VHyuxa4DRWq5mevlYB1YT1yL2TUAA8vRRNNyOyy5RwEww62j0cAM8yxa4B5kU8GbTrty2kgSD7nfbmYEaPNQIBIi5Mv7jq0fHkn0Z-5z43CwI5yWF3pfGygvYoqaL0_YC5np5AKSPP3S49KhA"

}

Get Authorization Token

Description

Get FortiCASB access token by the FortiCASB username and password.

URL

/api/v1/auth/token

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 password

username

Required

<username>

FortiCASB account user name

password

Required

<password>

FortiCASB account password

Sample Request

Request URL

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

Request Header

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

Request Body

grant_type: password

username: XXXXXXXXXX

password: XXXXXXXXXX

Response Variables

Name

Type

Description

access_token String Access token returned
refresh_token String Refresh token returned
token_type String Type of token

expires

String

Timestamp of when the token will expire

Sample Response

{

"token_type": "bearer",

"expires": 1.585002117836E12,

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6IkFQSSIsImlzcyI6ImZhdXRoLXNlcnZlciIsImhvc3QiOlsiRkNXUCJdLCJleHAiOjE1ODUwMDIxMTcsImFpZCI6InFhLmNhc2IxQGdtYWlsLmNvbSJ9.TFfhF3jRDnoj1W96gFOuMnxvAhdwU55IQdO6tpkOpH0",

"refresh_token": "I4WnuRUY0xHEsoNMDvmurq_J45VHyuxa4DRWq5mevlYB1YT1yL2TUAA8vRRNNyOyy5RwEww62j0cAM8yxa4B5kU8GbTrty2kgSD7nfbmYEaPNQIBIi5Mv7jq0fHkn0Z-5z43CwI5yWF3pfGygvYoqaL0_YC5np5AKSPP3S49KhA"

}