api v1 account - nsrr/sleepdata.org GitHub Wiki

Account API

Get Profile Information

This endpoint retrieves an account's profile information.

HTTP Request

GET https://sleepdata.org/api/v1/account/profile.json

Query Parameters

Parameter Default Description
auth_token null Include to access account information, using token found at https://sleepdata.org/token.

Curl Example

Get account information

curl -i https://sleepdata.org/api/v1/account/profile.json?auth_token=<AUTH_TOKEN>

The above command returns JSON structured like this:

{  
   "authenticated":true,
   "username":"remomueller",
   "full_name":"Remo Mueller",
   "first_name":"Remo",
   "last_name":"Mueller",
   "email":"[email protected]"
}

An unsuccessful authentication will result in the following response:

{
   "authenticated":false
}
⚠️ **GitHub.com Fallback** ⚠️