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

Unable to save custom attributes (bad 'pages' parameter) #213

Open
paulbeelen opened this issue May 27, 2019 · 1 comment
Open

Unable to save custom attributes (bad 'pages' parameter) #213

paulbeelen opened this issue May 27, 2019 · 1 comment

Comments

@paulbeelen
Copy link

paulbeelen commented May 27, 2019

I'm trying to update a user but I'm getting the following error: BadRequestError: bad 'pages' parameter

What I'm doing is the following:

user = intercom.users.find(email="[email protected]")
user.custom_attributes['firstName'] = 'Bob'
intercom.users.save(user)

Any ideas why this is not working?

UPDATE: I have been able to get this to work with id (intercom's id) and user_id (id assigned by us) but still not with email.

@jleclanche
Copy link

When searching with email=, the response returned is a collection instead of a single user. It's super weird. You can do something like this:

intercom_users = intercom.users.find(email="[email protected]")
intercom_user = intercom.users.find(id=intercom_users.users[0]["id"])

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

2 participants