GET user/…/email-addresses

Retrieves the collection of email addresses linked to a user account. The response also indicates which email address is set as the primary email address.

Users are always permitted to retrieve the details of their own user account. Retrieving the details of another user account is only permitted if the calling user is an administrator (staff user) of the same organization that manages the requested user account.

Resource URL

https://www.drillster.com/api/2/user/self/email-addresses

or

https://www.drillster.com/api/2/user/{user_id}/email-addresses

Response

A 2.0 UserEmailAddresses object with the details of the email addresses stored for the requested user account.

Parameters

Field Description
user_id
required
The user ID of the user to retrieve details for. To retrieve the details of the own user account, the value self may be used as well.

Example value: 7OuHq-RcQO_snGWR58TnBw

Example request

GET https://www.drillster.com/api/2/user/self/email-addresses

Response

{
  "total": 1,
  "userEmailAddresses": [ {
    "emailAddress": {
      "address": "thomas@example.com",
      "verified": false
    },
    "primary": true
  } ]
}

Error responses

The following error situations are possible:

ID Response code Description
not_authenticated 401 (Unauthorized) User was not authenticated
invalid_user_id 400 (Bad request) Given user ID is not valid
nonexistent_user 404 (Not found) Requested user not found
no_access 403 (Forbidden) Caller does not have access to requested user