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

ZendeskAPI::User::Identity.create displays an unnecessary warning #425

Open
pocke opened this issue Apr 20, 2020 · 0 comments
Open

ZendeskAPI::User::Identity.create displays an unnecessary warning #425

pocke opened this issue Apr 20, 2020 · 0 comments

Comments

@pocke
Copy link
Contributor

pocke commented Apr 20, 2020

ZendeskAPI::User::Idenity.create displays the following warning.

ZendeskAPI::User::Identity.create!(client, user_id: 12345, type: 'email', value: '[email protected]')
# WARNING: Removed restricted keys ["identity.user_id"] from parameters according to whitelist

The warning is from X-Zendesk-API-Warn response header.

But it is confusing. If I remove user_id from create, it doesn't work.

ZendeskAPI::User::Identity.create!(KibelaZendesk.client, type: 'email', value: '[email protected]')
# ZendeskAPI::Error::RecordNotFound: the server responded with status 404 -- post https://MY-SUBDOMAIN.zendesk.com/api/v2/users//identities

I guess we can suppress the warning if it removes user_id from the request body.
Because currently, it uses user_id in the URL and request body. So I guess we can remove user_id from the request body. But I haven't tried it yet.

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