Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error updating leads #248

Open
BradleyKirton opened this issue May 14, 2024 · 0 comments
Open

Error updating leads #248

BradleyKirton opened this issue May 14, 2024 · 0 comments

Comments

@BradleyKirton
Copy link

Hi there!

I am posting here to find out if there are any other users of this library which are experiencing errors when updating a lead.

lead = client.leads.find(id="valid-lead-id-here")  # This returns successfully

lead.updated_at = 1715691332
client.leads.save(lead)  # This returns an API exception

The library raises an exception ResourceNotFound: The requested resource does not exist; check your path and try again.

The underlying HTTP response is as follows.

{'errors': [{'code': 'not_found', 'message': 'The requested resource does not exist; check your path and try again'}], 'type': 'error.list'}

I have looked at the code and the library is issuing a PUT request for the update. We are using version 1.4 of the API which now states to update a POST request should be used.

https://developers.intercom.com/docs/references/1.4/rest-api/leads/update-lead/

We are going to resolve this locally by issuing a POST request to the contacts resource, I thought I would write here in case there are others experiencing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant