This article explains how you can upgrade your Oura API V1 integration to work with the Oura API V2. Oura will at least maintain the Oura API V1 until early 2023, and we recommend you upgrade your integration in 2022.
Existing Access Tokens
Existing access tokens from the Oura API V1 will remain valid for use with the Oura API V2 for personal information, daily activity, daily readiness, daily sleep, and bedtime data. Existing access tokens from the Oura API V1 will not have access to any new data types available through the Oura API V2, including daytime heart rate measurement, workout heart rate, workouts, tags, sessions, and other data types that will be released in the future. For access to new data types provided by the Oura API V2, you can either create new personal access tokens or ask users to consent to new data scopes via the OAuth authorization flow.
New Access Scopes
New access scopes include heart rate, workout, tag, and session. You can request users to consent to these scopes during the Oura user authorization process. See the documentation for more details.
Access Token Query Parameter
To improve the security of the Oura API, we have removed the option to use access tokens as a query parameter in the Oura API V2. Access tokens must be included as the “Authorization” request header. Please see the Authorization section of the Oura API V2 documentation for more details.
426 Error Code
You may receive a 426 response code when using the Oura API V2. This occurs when the Oura user's Oura mobile app does not meet the minimum app version requirement to support sharing the requested data type. The Oura user must update their Oura mobile app to enable the Oura API V2 to access the requested data type. We expect the number of 426 responses to go down over time and ultimately be reduced to zero as we complete a backend infrastructure migration.
The URL path schema has changed as follows:
V1: GET /v1/<data-type>
V2: GET /v2/usercollection/<data-type>
The tables below outline changes to the data models between the Oura API V1 and V2. The table is color-coded according to the following legend:
Green: No change from V1 to V2
Yellow: Modified from V1 to V2
Red: Removed from V1 to V2
Blue: New data field
Daily Activity Cont.
Daily Activity Cont.