Renew Authentication with the refresh token
Method
Use Case
This method is primarily intended for mobile applications.
Authentication Steps
This method does not allow authentication but only the renewal of an already acquired authentication. A prerequisite for using this method is to have previously used another method that generates a refresh token.
Here are the general steps:
- Step 1: You provide the refresh token.
- Step 2: You receive a new access token along with a new refresh token.
Step 1 - Provide the Refresh Token
Make a POST request to: https://{api_base_url}/{client_token}/oauth/v2/token
with the following parameters:
Parameter | Location | Description |
---|---|---|
api_base_url | Query | The API URL you wish to use. This varies depending on integration and production environments. |
client_token | Query | Each club group has a Resamania identifier called client_token. |
grant_type | Body | The method name, which should be set to refresh_token . |
refresh_token | Body | The token used to renew access. |
client_id | Body | Each registered application has an identifier with the OAuth server called client_id. |
client_secret | Body | Each registered application has a secret string with the OAuth server called client_secret. |
Example Request
bash
curl --location 'https://{api_base_url}/{client_token}/oauth/v2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=123_xxxxxxxxxxxxxxxxx' \
--data-urlencode 'client_secret=******************' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token=N2E2YzcwYWYxN...'
Step 2 - Receive the Access Token
The OAuth server API will return the following response:
json5
{
"access_token":"{access_token}",
"expires_in":{expires_in},
"token_type":"bearer",
"scope":{scope},
"refresh_token":"{refresh_token}"
}
parameter | description |
---|---|
access_token | The JWT token required for any request to the Resamania API. |
expires_in | The validity duration of the access token in seconds. |
token_type | The type of access token, which for Resamania is always Bearer. |
scope | The specific scopes related to the access token. |
refresh_token | The new token used to renew access. |