I came across something odd that I hope there is a fix for.
I am trying to retrieve items using Items_by_column_values.
Apparently, in order to use this method the board permission must be “View all items on the board” (or be a board owner)
That means that if I’m trying to query the items by using Items_by_column_values, and the board permission is on “View only items that are assigned to users or created by them in any “People” column”, I’m receiving back error code: UserUnauthroizedException.
Every other methods that I’ve checked (retrieve items by board, mutations etc.) are working great.
only the Items_by_column_values and items_by_multiple_column_values giving back an error.
In my opinion it is a great thing that the app adheres to the permission settings. If I don’t want other people to see my items I also don’t want them to show up in any type of search (including the API). It is important to understand under which user credentials the app is running. That depends on how you use the tokens. If you use shortLivedTokens in your app the token will grant permission based on the credentials of the user that added your app to the board. If this is either the board owner (or an admin?) you should be fine as those users can always view any item.
Sorry, but I don’t quite understand.
First of all, I am getting the error even directly from the playground, not using any token or an app.
And about the permission - I agree that you do not need to see items that are hidden for you. So, when I query items by this way for example:
{
boards(ids: x) {
items(limit: y) {
id
}
}
I am recieving back only items that the user is assigned or created by him exactly by the permission settings. as expected.
When I’m trying to query by this way:
Don’t know exactly why you get a 403 on items_by_column_value. Keep in mind that when adding an item the items is available for items_by_column_value somewaht later (up to 3 mnutes as I read in another thread).
On permissions and tokens. The playgroud runs under the credentials of the logged in user (as I remember). So, if you don’t have access to those items through the UI the playground will also not have access. The credentials used by an app is depending on how the app is designed.
Yes I’ve heard about the 3 mintues hold until you see the changes with the “items_by_column_value”.
Unfortunately it is not the case because I’m getting an Immediate error.
Is it possible that it is an monday bug or something? I also heard that the “items_by_column_value” is one of the latest methods added to the API.
How can I know why I am exactly getting error 403?
What do you mean by an immediate error? I think the question is: “how long ago is the item you are searching for added to the board?”. That is where the delay is. When an item is added to the board it can take a while before items_by_column_value can find it.