Перейти к содержимому

Получить профиль по OAuth-токену

POST
/oauth/userinfo
curl --request POST \
--url https://api.tride.ru/oauth/userinfo \
--header 'Content-Type: application/json' \
--data '{ "access_token": "<токен OAuth>" }'

Условия доступа описаны в руководстве по OAuth. Порядок подключения.

Media typeapplication/json
object
access_token
required

Access token (альтернатива Authorization header)

string

Example

{
"access_token": "<токен OAuth>"
}

При ошибке сервер возвращает поле error.

Media typeapplication/json
Any of:
object
sub

ID пользователя

string | null
firstname
string | null
lastname
string | null
nickname
string | null
avatar
string | null
email
string | null
phone
string | null
result
boolean
gender
age

Example generated

{
"sub": "example",
"firstname": "example",
"lastname": "example",
"nickname": "example",
"avatar": "example",
"email": "example",
"phone": "example",
"result": true,
"gender": "example",
"age": "example"
}