Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of Subitems not working for workspace non-admins as of Aug 22, 2023 #113

Open
mm360x opened this issue Sep 11, 2023 · 0 comments
Open

Comments

@mm360x
Copy link

mm360x commented Sep 11, 2023

Monday.com looks to have updated their API for non-admins to restrict boards queries, hence whenever I tried to create a subitem, this is the error I get:
{'errors': [{'message': "Permission Denied! Your token doesn't grant access to boards:read"}], 'account_id': 1234567}

After looking through the library code, it seems like the function mutate_subitem_query() in Lib\site-packages\monday\query_joins.py
is returning the mutation with an additional boards:read query, which is why it is erroring out:

def mutate_subitem_query(parent_item_id, subitem_name, column_values, create_labels_if_missing): column_values = column_values if column_values else {} return '''mutation { create_subitem ( parent_item_id: %s, item_name: "%s", column_values: %s, create_labels_if_missing: %s ) { id, name, column_values { id, text }, board { id, name } } }''' % (parent_item_id, subitem_name, monday_json_stringify(column_values), str(create_labels_if_missing).lower())

After deleing the below from the mutation return above, I was able to create a subitem successfully.
board { id, name }

@mm360x mm360x changed the title Creation of Subitems not working as of Aug 22, 2023 Creation of Subitems not working for workspace non-admins as of Aug 22, 2023 Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant