fetchConnectionToken

Fetches a connection token from your backend server.

On your backend server, use the /v1/terminal/connection_tokens endpoint to create a connection token, and return the connection_token from the response to your app. In your app, call the callback with the connection token, or an error if fetching the token failed.

Parameters

callback

Call this with a connection token, or an error if creating the connection token failed.