Post

1 follower Follow
0
Avatar

get available spaces for organization api

i am using the podio ruby client in a rails application to get the available spaces for an organization.

this works great when the user is an admin of the organization, but when they are a regular user, i get the following error

 

The user with id xxx does not have the right update on org with id yyy

 

this is the api call that is generating the error

spaces = Podio::Space.find_all_spaces_for_org(yyy)

 

is there any way to set this up so that non admins can see the spaces available within the organization?

Austin Martinez Answered

Please sign in to leave a comment.

1 comment

0
Avatar

You need to make two API calls.

Podio::find_all_for_org(org_id) will give you all the spaces in an org that the current user is a member of.

Podio::find_open_for_org(org_id) will give you all the open spaces in the org (spaces that can be joined without having a specific invite)

Andreas Haugstrup Pedersen 0 votes
Comment actions Permalink