# Updating users via Management API in Ruby fails because user IDs contain "|" characters

**URL:** <https://community.auth0.com/t/updating-users-via-management-api-in-ruby-fails-because-user-ids-contain-characters/99875>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [February 7, 2023, 9:52am UTC](https://community.auth0.com/t/updating-users-via-management-api-in-ruby-fails-because-user-ids-contain-characters/99875 "2023-02-07T09:52:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![whatever](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@whatever](https://community.auth0.com/u/whatever)\
**Post date:** [February 7, 2023, 9:52am UTC](https://community.auth0.com/t/updating-users-via-management-api-in-ruby-fails-because-user-ids-contain-characters/99875/1 "2023-02-07T09:52:12Z")

</div>

Let’s say I’m using Ruby, and I want to update a user’s email on Auth0.

To do so, I’d fire off a `put` request to the `/api/v2/users/{id}` endpoint with some headers and a body.

But, because Auth0 user IDs contain pipes, the URI looks a bit like this: `https://(auth0stuff)/api/v2/users/auth0|somerandomuseridstring`.

And pipes don’t seem to be valid characters in URIs (they’re normally encoded as `%7C`).

So Ruby won’t even build the URI for me. Encoding the pipe as `%7C` causes Auth0 to not find the user.

1. Am I overlooking something really obvious? (I hope so!)
2. Is this the same in other languages?

Pretty much as it says in the title. It seems like no matter which library I use for making the request to the Auth0 management

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 8, 2023, 10:20pm UTC](https://community.auth0.com/t/updating-users-via-management-api-in-ruby-fails-because-user-ids-contain-characters/99875/3 "2023-02-08T22:20:15Z")

</div>

Hi @whatever,

Welcome to the Auth0 Community!

The pipe should be URL encoded.

An example request URL would look like this:

```auto
https://YOUR-TENANT-NAME.auth0.com/api/v2/users/auth0%7C62c5bee0c6de397b3ef7f45b

```

Can you confirm you are sending in a valid user ID?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 28, 2023, 1:24pm UTC](https://community.auth0.com/t/updating-users-via-management-api-in-ruby-fails-because-user-ids-contain-characters/99875/4 "2023-03-28T13:24:17Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
