Get OAuth authentication URL for connecting a new site
POST/v1/authenticate-site
Generate OAuth authorization URL to connect e-commerce platforms. Supports Etsy, TikTok, and Amazon. Returns URL for user to complete platform authentication. State is signed with JWT for security and expires in 15 minutes.
Amazon has TWO separate OAuth tracks under the same platform_id=5, distinguished by presence of site_id in the body:
- Seller (SP-API): body
{ platform_id: 5 }— nosite_id. Connects a new Seller shop; creates a new Site record. - Ads: body
{ platform_id: 5, site_id: <seller_site_id> }—site_idMUST reference an already-connected Amazon Seller site. Attaches Ads credentials to the existing Site.
Partners must connect Seller first, then call this endpoint a second time with the returned site_id to connect Ads.
Redirect behaviour (unified across Seller + Ads):
- Both tracks support
redirect_url. After consent, Dodgeprint completes the token exchange and 302-redirects the user to the partner URL with a standard query contract:- Seller success:
<redirect_url>?platform=amazon&site_id=<new_site_id> - Seller failure:
<redirect_url>?platform=amazon&code=<err>&message=<msg> - Ads success:
<redirect_url>?platform=amazon&site_id=<site_id>&segment=advertising
- Seller success:
- Omit
redirect_urlto land on the default Dodgeprint FE URL and rely on polling:GET /v1/sites?platform_id=5&sort=-id&limit=1to detect a new Seller site, orGET /v1/sites/{id}?include=isAuthorizedAdsto detect Ads attachment on an existing site.
Request
Responses
- 200
- 400
- 401
- 403
- 422
Authorization URL generated successfully
Bad request - Invalid parameters or Amazon custom redirect not supported
Unauthenticated
Invalid workspace session
Validation error