Hi All :wave: I am trying out the API way of sendi...
# gooddata-platform
s
Hi All 👋 I am trying out the API way of sending invite to a user to join a workspace with pre-filtered data/data permissions applied. However, I am getting 403 Forbidden response. Can someone please help unblock and/or guide me ? API used:
/gdc/projects/{workspace_id}/invitations
API body:
{
"invitations": [
{
"invitation": {
"content": {
"email": "<mailto:new-user@example.com|new-user@example.com>",
"userFilters": [
"/gdc/md/{workspace_id}/obj/{filter-id}"
],
"role": "/gdc/projects/{workspace_id}/roles/{role-id}",
"action": {
"setMessage": "Hi, welcome to my project!"
}
}
}
}
]
}
i
Hi Shankar, Could you confirm, this user already exists within your domain, please? Would it be possible to share with us the RequestId or the ErrorId?
s
Hi Ivana, this will be a new user and I am trying out the API route to check the capability of sending invite to new users to join a workspace where data permission is applied. The other route of associating data permissions to an existing user via API route works! here is the response blob:
Copy code
{
  "error": {
    "component": "ApacheRESTMDComponentPermission",
    "errorClass": "Forbidden",
    "message": "Invalid operation",
    "parameters": [],
    "requestId": "id1Btako92FdKz2x:4xw3uxo5l6pxsji9"
  }
}
i
Thank you for provided details, appreciated. Could you double-check the endpoint for me, please? Looks like you are calling:
Copy code
/gdc/md/{workspace_id}/invitations
instead of:
Copy code
/gdc/projects/{workspace_id}/invitations
s
Oh wow! What a rookie mistake!! Thank you Ivana. Worked fine after I changed endpoint.
🙌 1
i
Yay, really glad that it worked for you. 😉
😃 1