Check email token
This endpoint checks an email token typically received in the unsubscribe/settings link of an email.
info
This operation does not require authentication.
info
Being an unauthenticated api call, it is possible to check the token, after clicking the link in the email, even anonymously. If the check will answer true, it will be possible, for example, to render a page for managing the email reception settings and subsequently call the user settings update endpoint.
HTTP Request
GET /api/v2/user/{id}/check_email_token/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | A unique integer value identifying the current user id. |
token | query | string | true | A token typically received in the unsubscribe/settings link of an email. |
Example Request
- JavaScript
- Bash
const headers = {
'Accept':'application/json'
};
fetch('/api/v2/user/{id}/check_email_token/?token={token}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X GET /api/v2/user/{id}/check_email_token/?token={token} \
-H 'Accept: application/json' \
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
is_valid | boolean | Is this token valid? |
Example responses
- 200
{
"is_valid": "boolean"
}