# User data endpoint

If the user has given consent, you can retrieve the granted data set with the access token.

# Request

GET https://auth.doccheck.com/api/users/data
    Authorization: Bearer {access_token}

# Response

If the user consented, the request returns the granted user data.

Example (test user):

{
  "unique_id": "50cf6446e3c757f9a43035c4e38d77c1",
  "first_name": "Micha",
  "last_name": "Muster",
  "profession_id": 217,
  "discipline_id": 274,
  "activity_id": 100032,
  "email": "testuser@example.com",
  "street": "Test-Strasse 66",
  "area_code": "55555",
  "city": "Teststadt",
  "country_id": 18,
  "country_iso_code": "DE",
  "user_language": "de"
}

Note

The fields actually returned depend on the configured scopes and the scopes granted by the user. For the complete field list including scope requirements, see User data endpoint return values.

Company passwords

Company passwords also have their own unique_id. When a user logs in with a company password, this unique_id can be returned by the user data endpoint if your integration calls the endpoint after a successful login.

# Error response

See the error messages here.

{
  "error_description": "xxxxx",
  "error": "xxxx"
}

# Preflight/OPTIONS

The endpoint supports CORS preflight requests using the OPTIONS method.

# Testing the endpoint

curl --location 'https://auth.doccheck.com/api/users/data' \
--header 'Authorization: Bearer test_token'