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

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

Hi @whatever,

Welcome to the Auth0 Community!

The pipe should be URL encoded.

An example request URL would look like this:

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

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

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