• 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.getShowpadOAuthInstance(
    '<clientId>',
    '<clientSecret>',
    '<allowedEmails>',
    '<password>',
    'v3'
    )

    await showpadApi.post('appsdb/stores/<storeId>')

    Parameters

    • clientId: string

      The clientId of the OAuth Client.

    • clientSecret: string

      The secret of the OAuth Client.

    • allowedEmails: string[]

      Array of email addresses that are allowed to use the OAuth Client. An empty array will allow ALL users to use the OAuth Client so be careful.

    • password: string

      The password of the current user.

    • 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.

    Returns Promise<AxiosInstance>

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

Generated using TypeDoc