POST
/oauth2/tokenGet access_token by client_credentials flow
Headers
AuthorizationstringrequiredBasic base64(client_id:client_secret)
Request Body
application/x-www-form-urlencodedrequiredForm for requesting access token using client_credentials
grant_typestringrequiredOAuth2 grant type, must be 'client_credentials'
Пример: client_credentials
scopestringrequiredMust be 'ROLE_EXTERNAL_INTEGRATION'
Пример: ROLE_EXTERNAL_INTEGRATION
Responses
curl -X POST \
'http://dev-backend-1.guestme.space/oauth2/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&scope=ROLE_EXTERNAL_INTEGRATION'Response
{
"scope": "ROLE_EXTERNAL_INTEGRATION",
"access_token": "eyJhbGciOiJIUzUxMiJ9...",
"token_type": "Bearer",
"expires_in": 599
}