• Support

    [Android] Android uses the showpad:// URL scheme in the file URL of an asset. getShowpadInstance uses Axios, which currently not allows custom protocols: https://github.com/axios/axios/issues/4901. Use other HTTP methods to fetch the raw asset on Android.

    Example

    import { Showpad } from '@showpad/experience-app-sdk'

    const showpadApi = await Showpad.getShowpadInstance('v3')

    const userInfoResponse = await showpadApi.get('users/me.json')
    const userInfo = userInfoResponse.data

    Parameters

    • Optional api: "v3" | "coach" | "v4"

      The axios instance uses the getShowpadApi and refreshShowpadApi domain as baseURL, pass api if you want to use the baseURL of the corresponding api.

    • Optional customToken: string

      The axios instance uses the getShowpadApi and refreshShowpadApi accessToken by default, pass customToken if you want to override this.

    Returns Promise<AxiosInstance>

    Axios instance to perform API requests. Instance takes care of authorization & refreshing access tokens.

Generated using TypeDoc