Authenticating
To authenticate with the Caf Connect API
, you must obtain an OAuth2
access token.
Obtain an access token using the client credentials grant type.
Body
grant_typestring · enumRequiredExample:
Grant type to use.
client_credentials
Possible values: client_idstringOptionalExample:
Client ID obtained from application.
your_client_id_here
client_secretstringOptionalExample:
Client secret obtained from application.
your_client_secret_here
Responses
200
Access token response
application/json
400
Invalid request
application/json
401
Invalid client credentials or refresh token
application/json
post
POST /oauth2/token HTTP/1.1
Host: api.us.prd.caf.io
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 89
"'grant_type=client_credentials&client_id=your_client_id&client_secret=your_client_secret'"
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.EkN-DOsnsuRjRO6BxXemmJDm3HbxrbRzXglbN2S4sOkopdU4IsDxTI8jO19W_A4K8ZPJijNLis4EZsHeY559a4DFOd50_OqgHs3wqrZdmxrjkgBF-yBYa7ULEqZV5B8fEVFsv-JOXOgVBB65PFhHhKWEZrFuEiN9JbkmfUWEhMfBZjKpPVuJCnKn1KvwHKFGKVJ8-SHOJDjV5Y4dRQqn-sxiSJsJbL0j1zKJVPJb8kqGhVQcOLG8RNu7nKkKKoMjV3JrJKvPdVT8J9wJKFk1kJo",
"token_type": "Bearer",
"expires_in": 3600
}
Last updated