> ## Documentation Index
> Fetch the complete documentation index at: https://docs.soharhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

The most common use case for the Sohar API is to determine the eligibility status and healthcare benefits for a patient. In this tutorial we will create a verification request to Aetna in the [sandbox environment](/documentation/guides/verification#sandbox-values).

<Steps>
  <Step title="Get Access Token">
    Create a client ID and client secret for the sandbox environment in the Sohar [dashboard](https://app.soharhealth.com/settings#oauth) and use them to get an access token.

    ```javascript theme={null}
    const response = await axios.post(
    	'https://api.soharhealth.com/oauth/token',
    	{
    		client_id: process.env.SOHAR_CLIENT_ID,
    		client_secret: process.env.SOHAR_CLIENT_SECRET
    	}
    );

    const accessToken = response.data.access_token;
    ```
  </Step>

  <Step title="Create Verification">
    Call the [Create Verification](/api-reference/verifications/create-verification-v2) API using your access token.

    ```javascript theme={null}
    const response = await axios.post(
    	'https://api.soharhealth.com/v2/verifications',
    	{
    		patient: {
    			firstName: 'John',
    			lastName: 'Doe',
    			dateOfBirth: '09/20/2006',
    			state: 'CA',
    			memberId: '00000000'
    		},
    		payerId: '60054',
    		placeOfServiceCode: '10',
    		specialtyCode: 'PSY'
    	},
    	{
    		headers: {
    			'Authorization': `Bearer ${accessToken}`
    		}
    	}
    );

    const verificationId = response.data.verificationId;
    ```
  </Step>

  <Step title="Get Verification">
    Call the [Get Verification](/api-reference/verifications/get-verification-v2) API with the `verificationId` to get the response. Note that it can take some time to deliver the response - you can either poll the endpoint or subscribe to [webhook events](/documentation/webhooks/events).

    ```javascript theme={null}
    const response = await axios.get(
    	`https://api.soharhealth.com/v2/verifications/${verificationId}`,
    	{
    		headers: {
    			'Authorization': `Bearer ${accessToken}`
    		}
    	}
    );
    ```
  </Step>
</Steps>
