Get started with Askara API in minutes. This guide walks you through authentication and your first API call.
- An Askara account (sign up)
- Basic knowledge of REST APIs and OAuth2
Contact us to register your application and obtain credentials:
- Contact our team
- Provide your application details and redirect URI
- Receive your
client_idandclient_secret
Use the Authorization Code Flow to authenticate:
https://app.askara.ai/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&state=random_state&scope=profile%20organization- Redirect the user to this URL
- User logs in and authorizes your application
- Askara redirects to your
redirect_uriwith an authorization code - Exchange the code for an access token:
curl -X POST https://api.askara.ai/oauth2/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "authorization_code",
"code": "AUTHORIZATION_CODE",
"redirect_uri": "YOUR_REDIRECT_URI",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}'Response:
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "eyJhbGci...",
"refresh_token": "def5020..."
}Store both tokens securely.
Retrieve the authenticated user's information:
curl -X POST https://api.askara.ai/me \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Response:
{
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"isVerified": true,
"organizations": [
{
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"streetAddress": "5 rue des Lilas",
"city": "Strasbourg",
"postalCode": "67000",
"country": "FR"
}
]
}Access tokens expire after 1 hour. Use the refresh token to obtain a new one:
curl -X POST https://api.askara.ai/oauth2/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "refresh_token",
"refresh_token": "YOUR_REFRESH_TOKEN",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}'- API Reference - Explore all endpoints
- OAuth2 Flows - Choose the right flow for your app
- Document Synchronization - Integrate document synchronization into your practice management system
- Rate Limiting - Understand API limits
- Community - Get help and share feedback
Use Authorization Code Flow with server-side token storage.
Use Device Code Flow for user-friendly authentication without browser redirects.
Integrate document synchronization to automatically receive validated medical documents. Use webhooks for real-time synchronization or polling for scheduled imports.
→ Document Synchronization Guide
Use Authorization Code Flow with secure server-side credential management.
Questions? Contact us or check our documentation.