TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Return the profile of the user behind an access token

GEThttps://api.testingapis.com/api/auth/oauth/userinfoSign in to see this endpoint's URL

Header: Authorization: Bearer <access_token>. The email is only included when the token has the email scope.

OAuth2 access token (password or authorization-code grant); or Bearer token — {{oauthAccessToken}}

Responses

200
User profile.
401
Token missing, invalid, revoked or expired.
403
client_credentials tokens have no user.

Example

Request
curl -X GET "https://api.testingapis.com/api/auth/oauth/userinfo" \
  -H "Authorization: Bearer {{oauthAccessToken}}" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "sub": "apibee",
  "name": "TestingAPIs Tester",
  "preferred_username": "apibee",
  "email": null,
  "email_verified": null
}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.