> For the complete documentation index, see [llms.txt](https://docs.appmixer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appmixer.com/6.0/v4.2/appmixer-sdk/api-reference/constructor.md).

# 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.2/tutorials/managing-authentication.md#check-token-expiration)tutorial. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.2/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.
