Hello world, we have an API
With this first post in our developer blog, I’m happy to announce that the Beddit.com API is now available!
The API lets you access the sleep information in Beddit service in machine-readable way. The API is freely available for non-commercial use.
Sleep information and some events
Right now, you can basically get a list of measured nights together with some summary numbers about your sleep. For any night, you can also request detailed sleep information including times of different sleep stages, and heart rate.
In addition to sleep information, you can read bed exit and bed enter events. These are generated when the user goes to bed and when she leaves the bed.
As the service evolves, we can add more information to the API, and also support write access where appropriate.
OAuth2 for authentication
We choose to use OAuth2 protocol for authentication in the API. That way, the user does not have to share her password with third-party services. Instead, the idea is that you use an access token to authenticate your requests.
To get an access token, you have to direct the user to an authorization page, where the user can sign in to the service (if she is not already signed in) and choose whether she grants your application access to her data.
If you have feedback or questions about the API, you reach us email@example.com, or you can post comments here so that others can see them, too.
More detailed information on how to use the API is found inside the Beddit service, check “API” link in the footer of the page.