Exchange FB embedded signup code for token and create progress
POST
/v1/waba/exchange-codeAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredRequest body
requiredapplication/jsonchannel_idstringExisting channel ID to update (if already created before OAuth)
channel_namestringrequiredDisplay name for the new channel
min length 1
codestringrequiredAuthorization code from FB SDK
min length 1
phone_number_idstringPhone number ID from FB postMessage FINISH event (may be absent for FINISH_ONLY_WABA)
waba_idstringrequiredWABA ID from FB postMessage FINISH event
min length 1
Responses
200OK
channel_idstring | nullrequiredcompleted_stepsanyrequiredcreated_atstringrequiredcurrent_stepstringrequirederrorstring | nullrequiredidstringrequiredorganization_idstringrequiredphone_number_idstring | nullrequiredstep_statusstringrequiredupdated_atstringrequiredwaba_idstring | nullrequired400Bad Request
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring401Unauthorized
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring403Forbidden
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring422Unprocessable Entity
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring500Internal Server Error
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/waba/exchange-code" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "string",
"channel_name": "string",
"code": "string",
"phone_number_id": "string",
"waba_id": "string"
}'const response = await fetch("/v1/waba/exchange-code", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"channel_id": "string",
"channel_name": "string",
"code": "string",
"phone_number_id": "string",
"waba_id": "string"
})
});import requests
response = requests.post(
"/v1/waba/exchange-code",
headers={
"Content-Type": "application/json"
},
json={
"channel_id": "string",
"channel_name": "string",
"code": "string",
"phone_number_id": "string",
"waba_id": "string"
},
)Response
{
"channel_id": "string",
"completed_steps": "string",
"created_at": "string",
"current_step": "string",
"error": "string",
"id": "string",
"organization_id": "string",
"phone_number_id": "string",
"step_status": "string",
"updated_at": "string",
"waba_id": "string"
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}