Inviting an admin can only be done if you have enabled RBAC. You can invite an admin by issuing a POST
request to /admins
.
curl -i -X POST http://localhost:8001/admins/register/ \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Kong-Admin-Token: $ADMIN_TOKEN" \
--data '
{
"username": "admin",
"email": "'$ADMIN_EMAIL'",
"rbac_token_enabled": true
}
'
Copied to clipboard!
If you have configured RBAC and configured Kong Manager to send email, you can create new Admins from within Kong Manager:
- In Kong Manager, navigate to Teams and select Invite Admin.
- Enter the appropriate information for your Admin.
- Select the desired Roles.
- Select Invite Admin.
If you have not configured Kong Manager to send email, you can generate a registration link by selecting the newly invited Admin, and clicking Generate Registration Link.
If you haven’t configured email capabilities your admin won’t receive an invite link, but the link will still be created.
You can copy the generated invite link from the Kong Manager UI and provide it directly to your intended admin.
By default, the invite link expires after 259,200 seconds (3 days).
You can customize this time frame by adjusting the admin_invitation_expiry
parameter in kong.conf
.