# 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](https://app.askara.ai/register))
- 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](https://www.askara.ai/en/contact)
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:



```bash
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:**


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

Store both tokens securely.

[→ Detailed OAuth2 Guide](/guides/oauth2)

## Step 3: Make Your First API Call

Retrieve the authenticated user's information:


```bash
curl -X POST https://api.askara.ai/me \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

**Response:**


```json
{
  "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:


```bash
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](/guides/refresh-token-flow)

## Next Steps

- **[API Reference](/apis/askara-symfony/askara-api)** - Explore all endpoints
- **[OAuth2 Flows](/guides/oauth2)** - Choose the right flow for your app
- **[Document Synchronization](/guides/document-synchronization)** - Integrate document synchronization into your practice management system
- **[Note Synchronization](/guides/note-synchronization)** - Receive AI-generated clinical notes in real-time
- **[Rate Limiting](/guides/rate_limiting)** - Understand API limits
- **[Community](https://askara.nolt.io/)** - Get help and share feedback


## 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](/guides/document-synchronization)
[→ Note Synchronization Guide](/guides/note-synchronization)

### Cloud-Based Software

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

## Support

Questions? [Contact us](https://www.askara.ai/en/contact) or check our [documentation](/apis/askara-symfony/askara-api).