# Receiving API

#### Receiving the Inference API

Once the user has clicked to Connect their Onairos account and authroized their data, you will recieve the Inference API via input parameter to your onResolved function which was used as input earlier into the Onairos Button&#x20;

Your onResolved callback function must be defined with the following signature:

```dart
  Future<void> onResolved(String apiUrl, String accessToken) async {
```

You will also be given an ACCESS TOKEN which you must use in any API requests from that specific client.

This is a short lived token, for usage on your developer registered domain only, and lasts for 1 hour from issue.

For example:

```dart
Future<void> onResolved(String apiUrl, String accessToken) async {
    try {
     //Fetch the the User Onairos Data Here
```

You will also receive the approved choices from the user.
