Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

User/lead initiated conversation using email returns 400 bad request #341

Copy link
Copy link
@palmer-milexa

Description

@palmer-milexa
Issue body actions

Version info

  • intercom-php version: 4.2
  • Intercom API version: 1.4
  • PHP version: 7.3

Expected behavior

I am trying (as per the documentation here: https://developers.intercom.com/intercom-api-reference/v1.4/reference#user-or-contact-initiated-conversation) to initiate a conversation using an email address, like so:

    $response = $client->messages->create([
        'message_type' => 'inapp',
        'body' => 'Hello....',
        'from' => [
            'type' => 'contact',
            'email' => 'example_email_address@example.com',
        ]
    ]);

I am expecting this to create the conversation, as the documentation states:

"The sending user or lead is identified by their user_id, email or id values in the from field, along with a type field value of user orc contact."

Actual behavior

This returns a 400 bad request response, if 'email' is used in the from field.

Logs

PHP Fatal error: Uncaught Http\Client\Common\Exception\ClientErrorException: Bad Request in .../vendor/php-http/client-common/src/Plugin/ErrorPlugin.php:72

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.