Refresh User Token
Use this API to refresh the id_token
and the access_token
for the end user.
Limit
The refresh token can be used only once. If it has expired a new API call will need to be made.
Call
curl --request POST \
--url https://api.ezid.io/email-link/refresh \
--header 'Content-Type: application/json' \
--data {
client_id: "your_client_id",
client_secret: "your_client_secret",
refresh_token: "68d62141-986b-462a-8715-a5783064d54e"
}
Attributes | Definition |
---|---|
client_id* | Your projects unique ID, provided by EZiD |
client_secret* | You projects unique secret, provided by EZiD |
refresh_token* | A valid refresh token returned from the /verify endpoint |
Please note: the
refresh_token
required for this API call is as a part of the/verify
API call.
Responses:
{
id_token: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzYWF0dmlrcnVkcmFwYXRuYUBnbWFpbC5jb20uZXppZC5pby83ZWM2MDJlNGQyZGIxMzQ3OTVhMzRjMDM4MDlmNzNlNiIsImlzcyI6Imh0dHByOi8vZXppZC5pbyIsImVtYWlsIjoic2FhdHZpa3J1ZHJhcGF0bmFAZ21haWwuY29tIiwicHJveHlfZW1haWwiOiJzYWF0dmlrcnVkcmFwYXRuYUBnbWFpbC5jb20iLCJub25jZSI6IjNlOThlYTRmLThlNGQtNGUxNC1iM2MzLWUxYjNhNGU2ODQ1MyIsImlhdCI6MTY0NTY3MjMyNCwiZXhwIjoxNjQ1NzA4MzI0fQ.mFc8UlLKJYc1usQkV_IEa9jd1AZEoolriX3-b37AOcbQs6EUGDHaHcAGQujHX7C32k0QX5bWfv0tcsp4LbKtwtJfxzgnMoZfAG7aAw_j6qXCfaJNwbI-qo7jmVkIHPHtydImBsL5z8AoysQ_fNyLl76kWTAXd_a4EFldE-AsGpccj3d8DG79tnI7XQkdSRvVH6OIhRIMXGhXirP-mgAewCsDnqUOhR9hBII-VdvNbvYDYtRpjsZpRSRzTfMLyf38Sn40LwAgGHKEctmnlcrMxpKZHhlSHGmIZ7ExEz9TyfrUK7c6hmKW-LmKDoNqKTg6tVa4M1STXW1upSqdClmvNl3NkmQ5p5ZuCeNIj71O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np_t5mwcwOJIs5qKAErJpqs9I_mHFzZxvmcLioVcZnoNAWRlgDnECowSPTVx43yCXp4aSFESwjlrWb3R2ltp3oMOrWolY2b4d5WKfbwNmiaVABKAkCOQkgki7pQbeuH5XbikFAxuzFhK-3DWwQweQ5sdD-exaOmxO0EjHcpHYDkPfe-5lC4nxhkLT66KE5KczIVOpjK2j3O-11JTWlWPpOCmfG5q8Bf9xL-EZ8lKYoB1HYttSexdFBDOoJr9aCiBSQtF1qYUYp9DkOYBuvemAfQ0Pb89Y4hjhyEog0C2rsEHaAY2vNHC3RF4DT7S52o",
refresh_token: "d71d7f03-0eca-4de2-b48d-a888d0de75d7",
success: true
}
{
success: false,
reason: "Client is not registered"
}
{
success: false,
reason: "invalid refresh token"
}
Attributes | Definition |
---|---|
id_token | This is a new ID token for the original refresh token's user |
access_token | This is a new access token for the original refresh token's user. |
refresh_token | The new refresh token. This can be used again for calling this endpoint |
success | The result of the request. This will be true for a successful request. |