Fortinet black logo

online help

Get Credentials Token

Get Credentials Token

Description

Get the FortiCASB OAuth 2.0 bearer token by the credentials generated on FortiCASB. Before using this API, first generate a credential on FortiCASB through Generate Credential.

URL

/api/v1/auth/credentials/token/

Method: POST

Request Header

Key

Value

Type

Description

Authorization Basic <FortiCASB credentials> String Authorization credential generated by FortiCASB
Content-Type application/x-www-form-urlencoded String

Request Body Parameters

Name Required Value Description
grant_type Required client_credentials

Sample Request

Request URL

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

Request Header

Authorization: Basic a0eddbf4-6840-4bb7-9789-acffd4ffac02

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

Request Body

grant_type=client_credentials

Response Variable

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.585248581336E12,

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6IkFQSSIsImlzcyI6ImZhdXRoLXNlcnZlciIsImhvc3QiOlsiRkNBU0IiXSwiZXhwIjoxNTg1MjQ4NTgxLCJhaWQiOiJxYS5jYXNiMUBnbWFpbC5jb20ifQ.PVfdrQ7NJYdYTu0PmIQnNUJJTWq3ZmW-iw2ux_8LLCM",

"refresh_token": "I4WnuRUY0xHEsoNMDvmuronKCCut-9FKHZOT4Pfuancwh46UUz5irXDK98bRmDKREdg05VQmjbN8zrcvsyatl9DvuuSOBfhQ4Kztmwu5VrhoMl3tpq1U_feWjs866PcMix9BUO2DYRzLXWucyjiyyT7uHZMwakKhps9vbWm9gzq3XpCej-yeX7ze0TNrWSG3WLh5n5sydU5NMNI_Stt-WycO05ZQL4FvRmqjn1-8Hz0"

}

Get Credentials Token

Description

Get the FortiCASB OAuth 2.0 bearer token by the credentials generated on FortiCASB. Before using this API, first generate a credential on FortiCASB through Generate Credential.

URL

/api/v1/auth/credentials/token/

Method: POST

Request Header

Key

Value

Type

Description

Authorization Basic <FortiCASB credentials> String Authorization credential generated by FortiCASB
Content-Type application/x-www-form-urlencoded String

Request Body Parameters

Name Required Value Description
grant_type Required client_credentials

Sample Request

Request URL

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

Request Header

Authorization: Basic a0eddbf4-6840-4bb7-9789-acffd4ffac02

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

Request Body

grant_type=client_credentials

Response Variable

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.585248581336E12,

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6IkFQSSIsImlzcyI6ImZhdXRoLXNlcnZlciIsImhvc3QiOlsiRkNBU0IiXSwiZXhwIjoxNTg1MjQ4NTgxLCJhaWQiOiJxYS5jYXNiMUBnbWFpbC5jb20ifQ.PVfdrQ7NJYdYTu0PmIQnNUJJTWq3ZmW-iw2ux_8LLCM",

"refresh_token": "I4WnuRUY0xHEsoNMDvmuronKCCut-9FKHZOT4Pfuancwh46UUz5irXDK98bRmDKREdg05VQmjbN8zrcvsyatl9DvuuSOBfhQ4Kztmwu5VrhoMl3tpq1U_feWjs866PcMix9BUO2DYRzLXWucyjiyyT7uHZMwakKhps9vbWm9gzq3XpCej-yeX7ze0TNrWSG3WLh5n5sydU5NMNI_Stt-WycO05ZQL4FvRmqjn1-8Hz0"

}