Skip to content

URL to connect an ad account

GET /api/marketing/oauth/url

Returns the Facebook Login dialog to send the user to and the signed state that goes with it. The state expires after 10 minutes and only works for the client that requested it: it must be sent back unchanged in the exchange. Requires the marketing:manage scope.

StatusDescriptionSchema
200—OauthUrlResponseDto
Terminal window
curl -X GET https://api.neike.dev/api/marketing/oauth/url \
-H "x-neike-api-key: whk_live_…"
FieldTypeDescription
urlstringrequiredURL of the Facebook Login dialog to send the user to.
statestringrequiredThe signed state carried in that URL. It is returned here too because the console stores it to send it back in the exchange and detect a callback it did not start.