# Quick Start
source: https://developer.mastercard.com/open-finance-europe/documentation/licensed/insights/quickstart/index.md

This guide details how to get your first insights result using our platform.

Details include:

1. How to obtain your `Client Secrets` to gain access to our platform
2. How to make your first insights API call and verify an account

Refer to [Postman collection](https://developer.mastercard.com/open-finance-europe/documentation/licensed/insights/testing/postman/index.md) together with this guide to get started faster.

#### Get your Credentials {#get-your-credentials}

1. Open a browser and go to our [Developer Portal](https://devportal.openbanking.mastercard.com).
2. Click on the **Sign up (or login)** button.
3. Log in to your account. If you do not have an account, click **Sign up** and create one for free.
4. Click on **Apps** , then click the **Create new app** button.
5. Take note of your `Client ID` and `Client Secret`.

Note: These credentials only provide access to the sandbox environment and therefore only expose *Test banks* . When you are ready to go live, go to the [Production access](https://developer.mastercard.com/open-finance-europe/documentation/licensed/insights/production/accessing-prod-data/index.md) section to learn how to get access to production data.

For step by step guides for the registration and login process, refer to [tutorials and guides](https://developer.mastercard.com/open-finance-europe/documentation/licensed/insights/tutorials/index.md)

#### Start an insights request and get a connect url: {#start-an-insights-request-and-get-a-connect-url}

```shell
curl -X POST \
https://insights.sandbox.aiia.eu/api/insights \
 -H 'Content-Type: application/json' \
 -H 'X-Client-Id: <CLIENT_ID>' \
 -H 'X-Client-Secret: <CLIENT_SECRET>' \
 -d '{
       "insightsTypes": ["ACCOUNT_OWNER", "ACCOUNT_BALANCE"],
       "accountOwner": {
         "customerName": "John Doe"
       },
       "redirectUrl": "https://developer.mastercard.com/redirect"
     }'
```

An example response is shown here:

```json
{
  "jobId": "69bf1e3b-37b8-4bc3-ab93-add081e5a954",
  "connectUrl": "https://app-sandbox.aiia.eu/#/connect/new-user?sessionId=bce853d8-d216-455d-b062-2608c7f63026&closeUrl=https%3A%2F%2Fhttpbin.org%2Fanything&culture=en",
  "expires": "2022-11-14T08:30:00Z"
}
```

Record the `jobId` and launch the connectUrl in a browser. Log in to Sandbox Data Bank 1. It accepts any username and any password as valid.

#### Verify job status: {#verify-job-status}

```shell
curl -X GET \ 
https://insights.sandbox.aiia.eu/api/insights/<JOB_ID>/status \
 -H 'Content-Type: application/json' \
 -H 'X-Client-Id: <CLIENT_ID>' \
 -H 'X-Client-Secret: <CLIENT_SECRET>'
```

An example response is shown here:

```json
{
  "status": "Succeeded",
  "accountOwner": {
    "status": "Succeeded",
    "expires": "2022-11-14T08:30:00Z"
  },
  "accountBalance": {
    "status": "Succeeded",
    "expires": "2022-11-14T08:30:00Z"
  }
}
```

Ensure the job status is `Succeeded`,

#### Query job results: {#query-job-results}

```shell
curl -X GET \
https://insights.sandbox.aiia.eu/api/insights/<JOB_ID>/results \
 -H 'Content-Type: application/json' \
 -H 'X-Client-Id: <CLIENT_ID>' \
 -H 'X-Client-Secret: <CLIENT_SECRET>'
```

Response will look like this:

```json
{
  "status": "Succeeded",
  "accountOwner": {
    "status": "Succeeded",
    "customerName": "John Doe",
    "score": 1,
    "accountDetails": [
      {
        "accountOwner": "John Doe",
        "accountNumber": "4356754"
      }
    ],
    "details": []
  },
  "accountBalance": {
    "status": "Succeeded",
    "accountDetails": [
      {
        "accountNumber": "4356754",
        "currentBalance": 100.23,
        "availableBalance": 100.23,
        "currency": "GBP"
      }
    ],
    "details": []
  }
}
```

## Next steps {#next-steps}

* Refer to the [Use Cases](https://developer.mastercard.com/open-finance-europe/documentation/licensed/use-cases/index.md) to understand how Mastercard Open Finance APIs facilitate a range of services.
* Refer to the [API References](https://developer.mastercard.com/open-finance-europe/documentation/licensed/insights/api-references/index.md) section to learn more about the API and how to integrate and test it for Insight Services.
