I’m testing a way to break my API calls by using emails with special characters, and I’m receiving a 400 error when calling the /api/v2/users
call when using the following email:
test+!#$%&'*±/=?^_`{|}~à@email.com
on my API I’m encoding the email using the javascript encodeURIComponent()
and results in this encoded email string:
test%2B!%23%24%25%26'*%2B-%2F%3D%3F%5E_%60%7B%7C%7D~%C3%A0%40email.com
the final API url looks like this:
[auth0 URL]./api/v2/users?q=${encodedURIEmail}&search_engine=v3
and this is the response I’m getting:
{ statusCode: 400, error: 'Bad Request', message: 'Invalid query: Syntax Error, cannot parse test+!#$%&\'*+-/=?^_
{|}~à@email.com: Lexical error at line 1, column 39. Encountered: after : "/=?^_{|}~\\u00e0@email.com" ' }
the user belongs to an auth0 IdP and that email was created through the create user from the user management section on auth0, so I assume the email was validated before I was able to create it.
is there any reason why the encoded email is triggering this error on the auth0 API?