---
title: authorizationCallback
framework: mapkitjs
role: symbol
role_heading: Interface Property
path: mapkitjs/mapkitinitializationoptions/authorizationcallback
---

# authorizationCallback

A callback function that obtains a token.

## Declaration

```data
authorizationCallback?: (this: null, done: (token: string) => void) => void;
```

## Parameters

- `done`: A function that completes the MapKit JS token request, called after creating a new token.

## Discussion

Discussion MapKit JS asyncronously invokes the authorizationCallback function throughout a session to obtain new authorization tokens. In the callback, you create a token and pass it to the function that MapKit JS provides in the done parameter.

## See Also

### Callback and language

- [language](mapkitjs/mapkitinitializationoptions/language.md)
