Getting Started
Let's make your first API call together. You'll be up and running in 5 minutes.
1. Create Your Account
Sign up for a WEIR account if you haven't already. Use passwordless sign-in with a passkey or magic link. You'll get access to the dashboard where you can manage your API keys and monitor usage.
2. Get Your API Key
Navigate to Settings → Developer tab to generate your credentials. You'll receive an API key and secret.
Web API Keys
For server-to-server and web applications. Optionally restrict to specific domains.
Mobile API Keys
For iOS/Android apps. Requires bundle ID binding and admin verification before use.
Keep your secret safe! Never commit it to version control or expose it in client-side code.
3. Exchange for Access Token
Use your API key and secret to get tokens. Access tokens expire in 1 hour; use the refresh token to renew without re-authenticating:
cURL
const response = await fetch('https://wapi.weir.ai/auth/token', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
api_key: process.env.WEIR_API_KEY,
api_secret: process.env.WEIR_API_SECRET
})
});
const { access_token, refresh_token, expires_in, scopes } = await response.json();
// access_token valid for 1 hour; use refresh_token to renew
4. Make Your First Request
Now use your access token to call the v2 API. Let's list your licenses:
cURL
curl https://wapi.weir.ai/licenses \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Success! You've made your first WEIR API call. The response contains your licenses with pagination.
Next Steps
Explore the API Reference
View Code Examples
Metadata Discovery
Set Up Webhooks
Manage API Keys