| title | Auth0 sample | |
|---|---|---|
| description | Simple usage of the Auth0 API | |
| integrations |
|
|
| categories |
|
The Auth0 sample demonstrates how to streamline user and role management using AutoKitteh's Auth0 integration.
This example showcases functionality to assign roles to users within Auth0 and retrieve insights into weekly user growth by querying newly created users.
API details:
- Assign Roles to Users: Automatically assign roles to users based on their IDs.
- Fetch Weekly User Growth: Retrieve and display the number of new users created in the past week.
- Initialize your connection with Auth0
- Copy the webhook URL from the "Triggers" tab (see the instructions here)
- Update the
ROLE_IDproject variable with theidof the role you want to assign to the user, e.g.,rol_fstvQ1eysK5VTkKt - You may modify this by modifying the
TIME_INTERVALproject variable - Deploy the project
assign_role:
Send an HTTP POST request to the webhook URL from step 2 in the Cloud Usage section above:
curl -i -X POST "${WEBHOOK_URL}" -d user_id=${USER_ID}weekly_user_growth:
Workflow is automatically triggered every week
Tip
The weekly_user_growth workflow can also be triggered manually by clicking the "Run" button in the UI, and setting the weekly_user_growth function as the entry point.
Follow these detailed instructions to deploy the project on a self-hosted server.