Skip to main content
Version: v3

Migrate external authentication connection

POST 

/marketplace/external-auth/migration

Migrates an external authentication connection credentials (basic or oauth2) for a specific app and location. This endpoint validates the app configuration, stores credentials safely in CRM's native encrypted storage. With this the lifecycle of the token is managed by CRM.

Request

Version stringrequired

API Version

Available optionsv3
application/json

Bodyrequired

    typestringrequired

    Type of authentication - basic or oauth2

    Available optionsoauth2basic
    locationIdstringrequired

    Location ID

    appIdstringrequired

    App ID

    appVersionIdstringrequired

    App Version ID

    accountIdstringrequired

    Connection identifier

    apiKeystring

    API Key (supported when type is basic)

    basicCredentialsobject

    Basic auth credentials as key/value pairs (supported when type is basic). Keys are validated against the app version externalAuthConfig.fields.

    accessTokenstring

    Access token (required when type is oauth2)

    refreshTokenstring

    Refresh token (required when type is oauth2)

    expiryInnumber

    Access token expiry time in milliseconds (optional for oauth2)

    expiryAtnumber

    Timestamp for access token expiry (optional for oauth2)

    scopesstring[]

    OAuth2 scopes (optional for oauth2)

    displayNamestring

    Display name for the connection (optional, defaults to accountId)

    isDefaultboolean

    Whether this is the default connection for the location (optional, defaults to false)

application/json

Connection migrated successfully

Schema
    successbooleanrequired

    Indicates if the migration was successful

    identifierstringrequired

    Unique identifier for the migrated connection

    messagestring

    Message describing the result