Add new user to own API from rule

I’m a bit stuck after lots of reading and trying. Once a user registers with Auth0 and logs in for the first time, I’d like to run a rule that makes an API request to my application to create a new user. The problem is that I need a valid JWT access token to hit my API. I thought that the access token and/or id token that the user receives once authenticating in my react app (and is subsequently used to make api requests) would be available in the rules… but it doesn’t appear to be.

  1. Is the access token that the end user receives available in rules? If so, how do I get it? I’ve checked the user, context, auth0, and configuration objects, but none seem to have what I need.

  2. If that user’s access token is not directly available in a rule, how do I obtain one? Do I need to make requests to /oauth/(authorize|token) to create one?

Just noticed that this appears to be a similar problem: Make a POST to API server using accessToken, after a user has registered

Thanks in advance.


Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?