This page shows how to authenticate against the Health API and make your first request. It continues with the server flow because that is the fastest way to verify your integration.Documentation Index
Fetch the complete documentation index at: https://docs.onvy.health/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- An ONVY
project_id - A confidential OAuth client with
client_idandclient_secretfor server-to-server traffic - If you are authenticating end users, an upstream OIDC token or refresh token from your identity provider
- The API base URL:
https://api.onvy.health
Choose your authentication path
| Integration type | Endpoint | When to use it |
|---|---|---|
| Backend or BFF | POST /v1/projects/{project_id}/auth/server | Your server needs an access token for machine-to-machine API calls. |
| Mobile or web app | POST /v1/projects/{project_id}/auth/sdk | You already have a user token from your identity provider and want an ONVY user token. |
| Direct OAuth integration | POST /oauth/token | You want to call the canonical OAuth endpoint directly. |
Authorization: Bearer <access_token> header.
Backend or BFF authentication
UsePOST /v1/projects/{project_id}/auth/server with HTTP Basic auth. This endpoint exchanges your confidential client credentials for an ONVY bearer token.
Mobile or web authentication
UsePOST /v1/projects/{project_id}/auth/sdk when you authenticate users with your own identity provider and want an ONVY user token in return.
Exchange an upstream OIDC token:
Canonical OAuth endpoint
If you need direct grant-level control, callPOST /oauth/token with application/x-www-form-urlencoded parameters. The /authentication page shows the supported grant shapes and examples.
Step 1: Create a user
User IDs are customer-supplied and unique within a project.Step 2: Read data back
Confirm the token works by listing users:What to do next
Understand auth
Learn how project auth endpoints map to the canonical
/oauth/token endpoint.Map resource families
See how users, daily records, summaries, facts, and meals fit together.
Configure webhooks
Receive signed outbound events when ONVY data changes.
Browse endpoints
Use the OpenAPI reference for route-by-route schemas and examples.