POST
/
v1
/
waba
/
exchange-code
Exchange FB embedded signup code for token and create progress
curl --request POST \
  --url https://api.wazapin.com/v1/waba/exchange-code \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel_name": "<string>",
  "code": "<string>",
  "waba_id": "<string>",
  "channel_id": "<string>",
  "phone_number_id": "<string>"
}
'
{
  "data": {
    "channel_id": "<string>",
    "completed_steps": "<unknown>",
    "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>"
  }
}

Authorizations

Authorization
string
header
required

Session token or API key

Body

application/json
channel_name
string
required

Display name for the new channel

Minimum string length: 1
code
string
required

Authorization code from FB SDK

Minimum string length: 1
waba_id
string
required

WABA ID from FB postMessage FINISH event

Minimum string length: 1
channel_id
string

Existing channel ID to update (if already created before OAuth)

phone_number_id
string

Phone number ID from FB postMessage FINISH event (may be absent for FINISH_ONLY_WABA)

Response

OK

data
object
required