Hello everyone,
I would like to integrate an authentication method into my application using the Ermeo API. To accomplish this, I need to obtain access and refresh tokens by making a POST request to the following URL:
bashCopy code
POST [API_URL]/oauth/v2/token
Request
The request body should be in application/json
format and include the necessary credentials to retrieve the access token from a username and password, along with the refresh token for future management.
jsonCopy code
{
"grant_type": "password",
"client_id": "[YOUR_CLIENT_ID]",
"client_secret": "[YOUR_CLIENT_SECRET]",
"username": "[YOUR_USERNAME]",
"password": "[YOUR_PASSWORD]",
"refresh_token": "[YOUR_REFRESH_TOKEN]"
}
-
grant_type
(string): The type of credentials to be provided in the request body to retrieve the tokens.- Allowed values:
password
,refresh_token
- Allowed values:
-
client_id
(string): The client ID provided to you. -
client_secret
(string): The client secret provided to you. -
username
(string): Your username. -
password
(string): Your password. -
refresh_token
(string): The refresh token from your previous authentication.
Responses
If the request is successful, the response will be returned with an HTTP 200 status code and a body in application/json
format containing all the information required to execute subsequent requests.
jsonCopy code
{
"access_token": "[YOUR_ACCESS_TOKEN]",
"expires_in": "[TOKEN_EXPIRATION_TIME]",
"token_type": "bearer",
"refresh_token": "[YOUR_REFRESH_TOKEN]",
"scope": "[SCOPE_VALUE]"
}
-
access_token
(string): The token that needs to be passed in the headers of all other requests. -
expires_in
(string): The number of seconds the access token is valid for. -
token_type
(string): The type of token, which will always be “bearer” in every case. -
refresh_token
(string): The refresh token needed when the access token has expired. -
scope
(string): Deprecated field.
Feel free to reach out if you need any further information or clarification.
Thank you.