400 | Bad Request - Invalid query: Syntax Error

I am trying to get the users, which are updated after a specific date,

But, when I call this URL via curl, I get the following error.
Auth0 response {“statusCode”:400,“error”:“Bad Request”,“message”:"Invalid query: Syntax Error, cannot parse updated_at:>2019-06-30: "}

Can anyone please guide me what is wrong with my query?

Hey there @umar.zulfiqar!

Let me check the syntax for it and tell you how to solve it!

Thanks ,I am using Auth0 V2 API.

Hey so in lucene query syntax (which is utilised by the API) date ranges work like: a_date:[2019-06-01 TO 2019-06-30] so you may use something like:


When I tried with the following URL.
https://.auth0.com/api/v2/users?per_page=50&page=0&include_totals=true&sort=email:1&include_fields=true&q=updated_at:[2019-06-30 TO 2019-07-02]

I got the following response.

403 Forbidden

403 Forbidden

I think the approach you have shared is applicable with V3 but not with V2.

I found that the way you suggested is working fine when i check with Postman, but not with Curl call.

Hmmm gotchya! Let me check something else! I’ll get back to you soon!

1 Like

Have you tried exactly with the percent symbol as I’ve written above?

@konrad.sopala Thanks man! it worked.

Glad I was able to help!

1 Like

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