API Documentation
Connecting to Vayu
To connect to Vayu and get your API credentials, follow these steps:
- Log into Vayu at http://app.withvayu.com
- Navigate to the Integrations section
- Click “Connect” on the Vayu card
A side pane will open with two important fields:
- Client ID - This is used to identify your organization when making requests to Vayu
- Fetch your API token - This is used to authenticate you when making requests to Vayu
Important Notes
- Once you generate the API token, make sure to click the copy button as it will not be visible to you in the future after closing the pane
- You can only have one active API token at a time
- To refresh your API token:
- First revoke the existing token (from the same place you generated it)
- Then click generate again to create a new token
Using Your Credentials
With the Vayu SDK
When using the Vayu SDK:
- Set your client ID as an environment variable:
- Pass your API token when initializing the Vayu client
For more details about using the SDK, see the SDK section.
Direct API Usage
When making direct API calls without the SDK:
- Include your client ID in the request headers:
- When using the API for login, you can read about the login request payload in the login endpoint documentation
Make sure to keep your client ID and API token secure and never expose them in client-side code.