Skip to content

Calling getUsers throws a 409 when duplicate profiles exist in intercom with same email #273

Description

@arimai

Version info

  • intercom-php version: 4.0.1
  • PHP version: 7.2.13

Expected behavior

I expected this line to make an API call such as https://api.intercom.io/users?email=<email-with-more-than-one-user> which should ideally return a list of users and their details that exist for the same email in intercom.

Actual behavior

I get a 409 Multiple existing users error message. Even though the api call seems to be right. Here is the exact error message:

Http/Client/Exception/HttpException with message 'Client error: `GET https://api.intercom.io/users?email=<email>` resulted in a `409 Conflict` response:
{"type":"error.list","request_id":"001n2v63prh02g8hv120","errors":[{"code":"conflict","message":"Multiple existing users (truncated...)

Another important thing to note here is that when I use curl or Postman to do the API request it works seamlessly.

Steps to reproduce (as granular as possible, including screenshots where appropriate)

  1. Have more than one user with the same email in intercom
  2. Call getUsers with $options set as 'email' => <insert-email-here>
  3. Verify that you get a 409 instead of getting an array with list of users. Check this to know what to expect: https://developers.intercom.com/intercom-api-reference/reference#list-by-email-1

Logs

Http/Client/Exception/HttpException with message 'Client error: `GET https://api.intercom.io/users?email=<email>` resulted in a `409 Conflict` response:
{"type":"error.list","request_id":"001n2v63prh02g8hv120","errors":[{"code":"conflict","message":"Multiple existing users (truncated...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions