Converting v1 to v2 fails with system generated API info

I am converting our Management API code from v1 to v2. I am able to authenticate properly but when I try to request users as I’ve done in the past with

https://n2ptest.auth0.com/api/v2/users/?page=

I get an unauthorized response. I am using the audience, id and secret as defined in my system generated API list.

Any idea what is wrong? Do I need a different API defined for this?

This may be a management api question. Awaiting your assistance in either case.

To further help me with this, the jwt looks like it has the correct scopes:
{

“scope”: “read:client_grants create:client_grants delete:client_grants update:client_grants read:users update:users delete:users create:users read:users_app_metadata update:users_app_metadata delete:users_app_metadata create:users_app_metadata create:user_tickets read:clients update:clients delete:clients create:clients read:client_keys update:client_keys delete:client_keys create:client_keys read:connections update:connections delete:connections create:connections read:resource_servers update:resource_servers delete:resource_servers create:resource_servers read:device_credentials update:device_credentials delete:device_credentials create:device_credentials read:rules update:rules delete:rules create:rules read:rules_configs update:rules_configs delete:rules_configs read:email_provider update:email_provider delete:email_provider create:email_provider blacklist:tokens read:stats read:tenant_settings update:tenant_settings read:logs read:shields create:shields delete:shields update:triggers read:triggers read:grants delete:grants read:guardian_factors update:guardian_factors read:guardian_enrollments delete:guardian_enrollments create:guardian_enrollment_tickets read:user_idp_tokens create:passwords_checking_job delete:passwords_checking_job read:custom_domains delete:custom_domains create:custom_domains read:email_templates create:email_templates update:email_templates”,
“gty”: “client-credentials”
}

The errors I’m getting are 404 - Not Found

1 Like

I’ve solved my issue. Thanks anyway

1 Like

Glad you have it working? Can you tell us what was the problem and how you fixed it? For the benefit of others

The issue was a combination of things. The URL for the GET had an incorrect ending ‘/’ and also the params didn’t include the set of fields needed. page=X alone was not providing the information. I needed &fields= to get the data.
I also had to change the email search to use q=email and not email.raw as I had in V1 as well as add the &search_engine=v3 to the request.

1 Like

Thanks a lot for sharing that with the rest of community!

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