VTEX Ads Single Sign On (SSO)
Enable seamless user authentication across environments with VTEX Ads SSO integration.
Single Sign On (SSO) allows users to switch between environments without having to log in again. Once a user is connected to the marketplace platform, they can reuse that session to access the VTEX Ads platform.
Requests to the VTEX Ads API are authenticated with the
X-Api-KeyandX-App-Idheaders. For details, see the VTEX Ads API overview.
1. Request the redirect URL
Send a POST request to the /sso/marketplace endpoint with the seller and user information. For the full request specification, including required headers and body parameters, see Generate seller single sign-on URL in the VTEX Ads API reference.
Request example:
_11curl --location --request POST 'https://api-retail-media.newtail.com.br/sso/marketplace' \_11--header 'X-Api-Key: XXX' \_11--header 'X-App-Id: YYY' \_11--header 'Content-Type: application/json' \_11--data-raw '{_11 "sso_token": "sso-token-12345",_11 "email": "seller@example.com",_11 "user_id": "seller123",_11 "name": "Seller Name",_11 "marketplace_name": "My Marketplace"_11}'
Response example:
_10{_10 "redirect_url": "https://app.ads.vtex.com/sso/auth?token=GENERATED_TOKEN"_10}
2. Redirect the user to the redirect URL
Once you have the redirect URL, redirect the user to it. The user is then logged in to the platform without requiring any additional login integration.
Login URL (user disconnection)
Optionally, you can redirect the user to a previously provided URL that is used when the user is disconnected.