Plivo cannot Create profile die to unexpected response from api

43 Views Asked by At

I am trying to use a Plivo feature to create a customer profile via API endpoint, here's my part of the code :

    $client = new RestClient(
       env('PLIVO_AUTH_ID', ''),
       env('PLIVO_AUTH_TOKEN', '')
    );

    $client
    ->client
    ->setTimeout(60);
    $authorized_contact = array(
        "first_name" => "John",
        "last_name" => "Doe",
        "email" => "********@gmail.com",
        "title" => "Mr",
        "seniority" => "admin",
        "phone" => "9381590950"
    );
    $address = array(
        "street" => "660 Broadway",
        "city" => "New York City",
        "state" => "NY",
        "postal_code" => "10001",
        "country" => "US"
    );
    $res = $client
    ->profile
    ->create("vishnu104", "", "DIRECT", "GOVERNMENT", "ABC Inc", "111111111", "PROFESSIONAL", "US", "ABC", "NASDAQ", "NONE", "google.com", $address, $authorized_contact);

The API response always with this response (the email I provide is 100% working, I try with different email addresses work email, or personal domain email) :

{
    "api_id": "25e709a3-d0b9-4568-99a7-0fbc327bcfe2",
    "error": "Invalid request parameter(s) - email"
}

if anyone can suggest any solution, I appreciate that thank you

php Plivo SDK version is 4.59.

0

There are 0 best solutions below