Start Facebook login (redirect)
const url = 'https://api.siprtc.io/v1/Accounts/example/Integrations/Meta/Authorization/Start?format=json';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.siprtc.io/v1/Accounts/example/Integrations/Meta/Authorization/Start?format=json' \ --header 'Authorization: Basic <credentials>'Same as GET …/Meta/Authorization, but answers with a 302 redirect straight to the Facebook login dialog instead of returning the URL, for use as a link a signed-in browser follows. On an error it redirects to the return URL (or the platform’s default page) with status=error and message in the query, unless the request asks for JSON (format=json, or an Accept header with application/json and without text/html), which gets a 400 instead. Authentication: HTTP Basic with the account’s Auth ID and Auth Secret. The operation always applies to the authenticated account; {auth_id} should be its Auth ID (with a parent account’s credentials on a sub-account’s path, the parent’s own integration is used, not the sub-account’s).
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of the authenticated account
Query Parameters
Section titled “ Query Parameters ”Where the browser goes after login (http/https URL on an allowed host); defaults to the Referer header
Alias of return_url
Json: report an error as a 400 JSON body instead of a redirect
Responses
Section titled “ Responses ”Redirect to the Facebook login dialog (Location header)
Example generated
exampleThe platform’s Facebook app is not configured (JSON callers only; others are redirected with status=error)
object
Message says what went wrong.
Status is always “failed” on an error (some validation errors omit it).
Example
{ "message": "error message", "status": "failed"}Missing or invalid credentials; the body is the JSON string Authentication failed
Example generated
example