Connect Stripe and Auth0 with Zapier: problem with the role_id format

Hi everybody,

I’m actually trying to integrate Auth0 with Stripe by using Zapier, in the purpose to change the roles of users with the Auth0 API endpoint /api/v2/roles/{id}/users

I think I almost done, but I get an error 400 when I try to validate the POST webhook:

Path validation error: ‘Object didn’t pass validation for format role-id: {id}’ on property id (ID of the role to assign users to). (HTTP Status Code: 400)

What I’m trying to do is to retrieve the auth0_role_id and auth0_user_id sent by Stripe and to POST them into my users in Auth0 in the purpose to add/change their roles. The role_id and user_id in Stripe are matching exactly with the role_id and the user_id set in Auth0. It’s why I d’ont understand the error that is returned…

Here is the Zapier webhook settings:

If someone can have a look on how I set the data and tell me where I’m wrong, I will be glad! :slight_smile:

Hi @pz.guillaume,

It looks like you aren’t passing the role ID in the URL and are incorrectly passing the user ID.

This doc shows how to format the request:
https://auth0.com/docs/api/management/v2/roles/post-role-users

1 Like

Hello @dan.woda
Thank you for your reply!
I’m feeling you are right, but I can’t still figured it out.

I’ve tried to pass the role ID and the user ID in the URL, but I get an error 404 in this case.

The docs from Auth0 noted that an error 404 is Role not found or One or more of the users do not exist. But this user and this role are existing in Auth0…

So, I don’t understand in this case how to pass the ID role…?

@pz.guillaume,

You should format the URL like this:

https:/dev....auth0.com/api/v2/roles/rol_PZ.../users

and pass the user IDs in the Data field like this:

{"users":["auth0|123"]}

Hope that helps!

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