I'm trying to get current user organization requests, the api-documentation provides the following endpoint for this:
GET /api/v2/organizations/{organization_id}/requests.json
But I'm not able to get here using the gem collections.
My client instance has and end-user email, so it has end-user privileges. The above endpoint works fine with the credentials since the organization matches the current user one (tested with postman), but when trying to access to @client.current_user.organization or @client.current_user.organization.requests it throws an error since it first does a call to:
GET api/v2/organizations/{organization_id}
and that returns a 403 forbidden error.
Issue #269 suggest finding the single org if you already have the id, but that line does the same GET call as asking for @current_user.organization, which ends up in the same 403 error.
Any help on how to call GET /api/v2/organizations/{organization_id}/requests.json directly from the gem using enduser privileges?
I'm trying to get current user organization requests, the api-documentation provides the following endpoint for this:
GET /api/v2/organizations/{organization_id}/requests.json
But I'm not able to get here using the gem collections.
My client instance has and end-user email, so it has end-user privileges. The above endpoint works fine with the credentials since the organization matches the current user one (tested with postman), but when trying to access to
@client.current_user.organization
or@client.current_user.organization.requests
it throws an error since it first does a call to:GET api/v2/organizations/{organization_id}
and that returns a 403 forbidden error.
Issue #269 suggest finding the single org if you already have the id, but that line does the same
GET
call as asking for@current_user.organization
, which ends up in the same 403 error.Any help on how to call
GET /api/v2/organizations/{organization_id}/requests.json
directly from the gem using enduser privileges?