I am trying to get all users from monday using the API v2.
This query below displays all users with the details specified on the query:
query {
users{
id
name
email
}
}
So now I’m trying the below request from a python script:
headers = {"Authorization" : config['api_key']}
apiUrl = "https://api.monday.com/v2"
query = {"query": "users { id email }"}
res = r.post(url=apiUrl, json=query, headers=headers)
res_data = res.json()
I ma getting the following error:
{'errors': [{'message': 'Parse error on "users" (IDENTIFIER) at [1, 1]', 'locations': [{'line': 1, 'column': 1}]}], 'account_id': 9415663}
Please help, what am I doing wrong?