Request Authorization Code
You can implement OAuth2 authentication to your application using our OAuth2 endpoints. You need to redirect users to /api/v3/oauth2/authorize endpoint to get an authorization code and include the parameters below. This page will ask the user if they want to allow a client's application to submit or obtain data from their QM account. It will redirect the user to the url provided by the client application with the code as a query parameter or error in case of an error. See the /api/v1/oauth/access_token endpoint for the next steps.
Request
- Base URL: https://api.curedao.org/api
- URL: https://api.curedao.org/api/v3/oauth2/authorize
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.curedao.org/api/v1/oauth/authorize, token URL https://api.curedao.org/api/v1/oauth/token, scopes: basic)
Query parameters
Your CureDAO client id can be obtained by creating an app at https://builder.curedao.org
This is the secret for your obtained clientId. We use this to ensure that only your application uses the clientId. Obtain this by creating a free application at https://builder.curedao.org.
If the value is code, launches a Basic flow, requiring a POST to the token endpoint to obtain the tokens. If the value is token id_token or id_token token, launches an Implicit flow, requiring the use of Javascript at the redirect URI to retrieve tokens from the URI #fragment.
Scopes include basic, readmeasurements, and writemeasurements. The basic scope allows you to read user info (displayName, email, etc). The readmeasurements scope allows one to read a user's data. The writemeasurements scope allows you to write user data. Separate multiple scopes by a space.
The redirect URI is the URL within your client application that will receive the OAuth2 credentials.
An opaque string that is round-tripped in the protocol; that is to say, it is returned as a URI parameter in the Basic flow, and in the URI
Response
Successful Operation
Changes
No recorded changes to this operation across all 10 revisions of this API.