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 \
  -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.

→ Detailed OAuth2 Guide

Step 3: Make Your First API Call

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"
    }
  ]
}

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 \
  -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"
  }'

→ 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 synchronization to automatically receive validated medical documents. Use webhooks for real-time synchronization or polling for scheduled imports.

→ Document Synchronization Guide

Cloud-Based Software

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

Support

Questions? Contact us or check our documentation.