Search code examples
smooch

Linking not supported for whatsapp sandbox integrations


I'm trying to follow this guide to start business initiated conversation in WhatsApp. I successfully created the user in the first step, but I cannot link it to the WhatsApp channel.

I'm calling API POST request:

https://api.smooch.io/v1.1/apps/{myAppID}/appusers/{myUserID}/channels

With body:

{
    "type":"whatsapp",
    "confirmation":{"type":"immediate"},
    "phoneNumber":"phoneNumberInInternationalFormat"
}

But result is:

{
    "error": {
        "code": "bad_request",
        "description": "Linking not supported for whatsapp sandbox integrations."
    }
}

So my question - is there any way to send a message using Sandbox number, or I need to register a number by requesting access process?


Solution

  • The linking API is disabled in Sandbox mode, but you can still send and receive messages from the phone number you used to set up the sandbox. Just send a message to the sandbox number and it will automatically create a user in your Smooch App. Then, you can use the API or business system integrations to reply just as you would with any other user.

    See also the section on user-initiated conversations in the WhatsApp guide