cURL
curl --request POST \ --url https://app.mlm-platform.com/api/v1/auth/exchange \ --header 'Content-Type: application/json' \ --header 'x-tenant-api-key: <api-key>' \ --data ' { "externalJwt": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...", "provider": "open-ears" } '
{ "accessToken": "<string>", "refreshToken": "<string>", "tokenType": "Bearer", "expiresIn": 123, "scope": "<string>", "mlmUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "isNewUser": true }
Exchanges a JWT from an external identity provider (e.g., Open Ears) for MLM platform access and refresh tokens. If the user doesn’t exist and auto-creation is enabled for the provider, a new user is created.
Tenant API key for authentication
JWT from external provider
Provider ID (e.g., 'open-ears')
Deprecated alias for externalJwt
Token exchange successful
Bearer