A superuser can invite another user to use the app on behalf of the superuser.
Token Bearer
is the access_token
of the superuser, as only the superuser can invite users. The invited users will not be able to invite more users.
Request
POST [<https://api.ezid.io/email-link/>](<https://api.ezid.io/email-link/getusers>)invite
Content-type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0ZXN0cHQxOUBlbWFpbC5jb20uZXppZC5pby84YjVlNmU3YTQ1Y2FlYzdiODkxYzEzYThhMjQ4NGFjZiIsImlzcyI6Imh0dHBzOi8vZXppZC5pbyIsImF6cCI6IjhiNWU2ZTdhNDVjYWVjN2I4OTFjMTNhOGEyNDg0YWNmIiwic2NvcGUiOiJvcGVuaWQiLCJpYXQiOjE2NDI5OTYxNTAsImV4cCI6MTY0MzAzMjE1MH0.pVOqoci3s3-cW4vi0bb8OQdwgsZt_XfXpGbChGGJboRaADij4WXWofis1WXJ6_lqVPqpOLFU81ucKycNoN4o9TLeHaVUrr9gGw7qWDJmg_-u5YQ6rhRWzBVMqY7RCQ3N4TP0t5ybd9Y7z_au2T4b1BOfG5v6GpjyUCFUqr7Z0G6BqlY0iQE6bFfhELf7mhQqC52mKV2A88ySYETkKuyLMm7KFnHqfzFPNuDSLCPwVCfm-jlkmlkRWN3OY7vI0dBeyeJpIMeRyyKINKRddLM4gY9xFmuNqHTZlfNkVOxBc2bjeDraIUZGm9vsSeALInxIZYkk46Q0Yf5sRkz6M4ok1j9NzqJ42HtLqtuz-QmMtroudxdJ2dltVc7Yo_6a3iyZvn52ylHB0u7OpavkUKMcyqCTH85ipZ3INb2x3eqgXBuVVqgVQ8gta7Z-CjfpfHeQrdn48xLUpK7GcxxQQpnX_EvsbfZ8vduk60SbBhtUxb5M09xLLrbXDemxMshPwSJqXzs2YU4Au53jO7okg0fVzM4O7NqLp-16k9TlNXPDlg4-Zc1ZtPlRpxqHMGT35I7SZuucUaKSG9OmXyeGuGgJ2ogwrTK2uTJWYYK5OwU4dtoNltwbtuN_75Ep46WhG71uAijHpINkpcHpenyWIFE5SfUEbDgU6R2N_kOHklFGdqM
{
"proxy_email":"[email protected]",
"client_id":"8b5e6e7a45caec7b891c13a8a2484acf",
"client_secret":"4d6765d698ce1824a678ca07143decdba4c123d08743e72eb8b0bf7fc4028d8e",
"expiry":"300000",
"push_email":"No",
"base_url_email_link":"<https://planettree.co/auth>",
"callback_url":"<https://planettree.co/home>",
"login_hint":"[email protected]", //optional; can add this to include user email to be able to prepopulate email once user clicks on magic link
"claims":{ // can add custom claims for API access control. This is returned encoded within the access token, even when the access token is refreshed with the refresh token.
"role": "read-only-user",
}
}
Response
{
"success": true,
"email_link": "<https://planettree.co?code=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1dWlkIjoiODRmZTE5OWYtMmUzNy00NmNkLTgzNmItNGEzN2RkN2EzODU1IiwiaWF0IjoxNjQxODgzNDAzLCJleHAiOjE2NDE4ODM3MDN9.PYRBGNzz9dmhKAcSxK0-o3pmIHn6ulazfyMzF4v7n0U&callback_url=https%3A%2F%2Fplanettree.co%2Fhome&[email protected]>"
}
The “email
” field in the returned id_token
token is the superuser that the user is acting on behalf of. The “proxy_email
” field is the user that was invited who is logged in.
Prev: Refresh token