Skip to content
Last updated

Quickstart Guide

Get started with Askara API in minutes. This guide walks you through authentication and your first API call.

Prerequisites

  • An Askara account (sign up)
  • Basic knowledge of REST APIs and OAuth2

Step 1: Create Your Application

Contact us to register your application and obtain credentials:

  1. Contact our team
  2. Provide your application details and redirect URI
  3. Receive your client_id and client_secret

Step 2: Authenticate a User

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
  1. Redirect the user to this URL
  2. User logs in and authorizes your application
  3. Askara redirects to your redirect_uri with an authorization code
  4. Exchange the code for an access token:
curl -X POST https://api.askara.ai/oauth2/token \
  --data-urlencode "grant_type=authorization_code" \
  --data-urlencode "code=AUTHORIZATION_CODE" \
  --data-urlencode "redirect_uri=YOUR_REDIRECT_URI" \
  --data-urlencode "client_id=YOUR_CLIENT_ID" \
  --data-urlencode "client_secret=YOUR_CLIENT_SECRET"

Response:

{
  "token_type": "Bearer",
  "expires_in": 3600,
  "access_token": "eyJhbGci...",
  "refresh_token": "def5020..."
}

Store both tokens securely.

→ Detailed OAuth2 Guide

Step 3: Make Your First API Call

Retrieve the authenticated user's information:

curl -X GET https://api.askara.ai/me \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  "email": "user@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "isVerified": true,
  "organization": {
    "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
    "name": "Cabinet dentaire des Lilas",
    "streetAddress": "5 rue des Lilas",
    "city": "Strasbourg",
    "postalCode": "67000",
    "country": "FR"
  },
  "organizationRole": "ROLE_ORGANIZATION_ADMIN",
  "isOrganizationAdmin": true
}

Token Management

Access tokens expire after 1 hour. Use the refresh token to obtain a new one:

curl -X POST https://api.askara.ai/oauth2/token \
  --data-urlencode "grant_type=refresh_token" \
  --data-urlencode "refresh_token=YOUR_REFRESH_TOKEN" \
  --data-urlencode "client_id=YOUR_CLIENT_ID" \
  --data-urlencode "client_secret=YOUR_CLIENT_SECRET"

→ Token Refresh Guide

Next Steps

Common Integration Patterns

Web Application

Use Authorization Code Flow with server-side token storage.

Desktop Application

Use Device Code Flow for user-friendly authentication without browser redirects.

Practice Management Software

Integrate document and note synchronization to automatically receive validated medical documents and AI-generated clinical notes. Use webhooks for real-time synchronization or polling for scheduled imports.

→ Document Synchronization Guide → Note Synchronization Guide

Cloud-Based Software

Use Authorization Code Flow with secure server-side credential management.

Support

Questions? Contact us or check our documentation.