Get Token Info
curl --request GET \
--url https://api.loyalty.dog/v2/token \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyalty.dog/v2/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/token"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "5eb7cf5a86d9755df3a6c593",
"email": "[email protected]",
"name": "<string>",
"emailVerified": "2023-11-07T05:31:56Z",
"active": true,
"admin": false,
"image": "<string>",
"location": "<string>",
"website": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Token
Get Token Info
Retrieve user information associated with the current access token.
Parameters:
current_user(User): The user instance obtained from the current access token.
Returns:
UserRead: The serialized user data.
GET
/
v2
/
token
Get Token Info
curl --request GET \
--url https://api.loyalty.dog/v2/token \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyalty.dog/v2/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/token"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "5eb7cf5a86d9755df3a6c593",
"email": "[email protected]",
"name": "<string>",
"emailVerified": "2023-11-07T05:31:56Z",
"active": true,
"admin": false,
"image": "<string>",
"location": "<string>",
"website": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Response
Successful Response
