- Log into Vayu at http://app.withvayu.com
- Navigate to the Integrations section
- Click “Connect” on the Vayu card
- Client ID - Identifies your organization on every request (
x-api-keyheader) - API Token - A long-lived token used to obtain short-lived access tokens via the
/loginendpoint
Copy the API Token immediately — it won’t be shown again after you close the pane.
How authentication works
Vayu uses a two-token model:| Token | Where it comes from | Lifetime | How it’s used |
|---|---|---|---|
| API Token (refresh token) | Vayu dashboard | Long-lived | Sent to POST /login to get an access token |
| Access token | POST /login response | 1 hour | Sent as Authorization: Bearer <token> on every API call |
/login and refreshes the access token as needed.
Important Notes
- You can only have one active API Token at a time
- To rotate your API Token: revoke the existing one, then generate a new one from the same place
Using Your Credentials
With the Vayu SDK
The SDKs handle the full token lifecycle — just pass your API key and start making calls.Direct API Usage
Every request needs two headers:x-api-key: <your Client ID>Authorization: Bearer <access token>(obtained fromPOST /login)
Full example — obtaining and using an access token
Access tokens expire after 1 hour. If using a raw HTTP client, re-call
/login when you receive a 401 response. The SDKs handle this automatically.