Intercom API returns 409 error

Hello Intercom team,

We’re working on integrating the intercom api with our api so that it automatically creates a user when someone signs up, unfortunately we are experiencing a few issues and could do with some assistance please.

We have created a script that imports all users on our site into intercom via the contacts api. We first tested it on our staging environment with the TEST intercom workspace and it was working fine.

Now we have move to our production site and our real intercom workspace, when we use the script to create a user it returns a HTTP 409 for each user we try to import. According to the docs, 409 means “Conflict - Multiple existing users match this email address - must be more specific using user_id”

We’re using unique email addresses and user_ids for the users we are importing.

Also, we queried the Intercom contacts api and can see we only have two contacts in intercom so I can’t see how it can be rejecting each user we try to create with a 409 error.

Please advise on what could be going wrong. Thanks in advance.

Hey @Mike_S , did you created a new app for the real Intercom workspace?

For real Intercom workspace, you should create a new app and get a new Access token.

Hey @shengeliaroy thanks for the reply.

Yes the 409 happens with a new app and access token. Also note, I am able to query the
Intercom contacts api with the new app and access token, and also able to set some data attributes, so it doesn’t seem that is the issue.

@Mike_S, once API returns 409 it includes user ID where details matched.

 {
      "code": "conflict",
      "message": "A contact matching those details already exists with **id=5da6f18e3d7cf967e4582d05**"
    }