authentication-services-colmena icon

authentication-services-colmena

(2 reviews)

๐Ÿ” How to Get a New Token

To authenticate and consume the organizationโ€™s services, you must first obtain an access token by making a POST request to the /token endpoint of the authentication-api.

๐Ÿ“ค Request

Method: POST

Endpoint: /token

Content-Type: application/json

Headers:

HeaderTypeRequiredDescriptionExample
client_idStringYesClient ID provided to you123456
client_secretStringYesSecret associated with the client ID123456
grant_typeStringNoGrant type, use CLIENT_CREDENTIALSCLIENT_CREDENTIALS

๐Ÿ’ก This endpoint does not require a request body. Only headers are required.


โœ… Successful Response

Status Code: 200 OK

Content-Type: application/json

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 3600
}
FieldTypeDescription
access_tokenStringJWT token used to authenticate future requests
token_typeStringToken type, typically Bearer
expires_inNumberTime in seconds until the token expires

๐Ÿ›‘ Error Responses

Example - Missing or invalid credentials:

Status Code: 401 Unauthorized

{
  "error": "invalid_client",
  "error_description": "Client authentication failed"
}

Status Code: 400 Bad Request

{
  "error": "unsupported_grant_type",
  "error_description": "The authorization grant type is not supported"
}


ยฟQuieres que lo adapte tambiรฉn a espaรฑol o necesitas el mismo formato para otros endpoints?


Reviews