# Constructor

## Appmixer

| Method                                      | Description                                                                                                                                                                                                                                                     |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Appmixer({ baseUrl })`                     | A constructor function to create an instance of the Appmixer SDK. Pass the base URL of the engine (Appmixer API).                                                                                                                                               |
| `appmixer.set(key, value)`                  | Set a property on the appmixer SDK object. Currently only `accessToken` should be set to be able to make calls to the Appmixer API.                                                                                                                             |
| `appmixer.onInvalidAccessToken(callbackFn)` | Allows setting a callback function that will be called whenever the current access token on the SDK is not valid. More information can be found on the [Managing Authentication ](/6.0/v4/tutorials/managing-authentication.md#check-token-expiration)tutorial. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmixer.com/6.0/v4/appmixer-sdk/api-reference/constructor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
