Skip to main content
Question

Can't successfully run the example script from the Monday API documentation site

  • November 1, 2025
  • 3 replies
  • 177 views

I am unable to get the introductory API script from the Monday documentation to work. Can someone look at this short script and point out the issue? Even better, could someone run the script on their own system (with their own token) and tell me whether it works for them?

I want to pull information from some of my Monday boards using Python. I am unable to get past the first step, which is to successfully get a request returned from the API.

 

I am using the sample python script from this page:  https://developer.monday.com/api-reference/docs/getting-started

 

That article suggests that I enable developer mode. I am not able to enable it based on my work account permissions. However, I can go to the Developer Center page and get my GraphQL API token, which is a 227 character string.

 

The article gives an introductory example in various languages. The python example is an 11 line script.

 

I replaced YOUR_API_KEY_HERE with my 227 character API token and added three print statements for testing. The resulting script is (with the token removed for privacy):

import requests

import json



apiKey = "removed for this post"

apiUrl = "https://api.monday.com/v2"

headers = {"Authorization" : apiKey, "API-Version" : "2023-04"}



query2 = 'query { boards (limit:1) {id name} }'

data = {'query' : query2}



print("***Ready for the request call.***")

r = requests.post(url=apiUrl, json=data, headers=headers)

print("***Returned from the request call.***")

print(r)

I am using uv. To run the script, I type "uv run apisample.py" and the result displayed is:

***Ready for the request call.***
***Returned from the request call.***
<Response [504]>

It takes a full minute for the script to run so I assume [504] is a timeout error.

Any help is appreciated. Thank you.

3 replies

mitchell.hudson

Hey ​@StevenBennett ,

 

Try removing the API version, or updating it to either “2025-07” or “2025-10”. In saying that, it should default to the current version anyway.

 

Have you managed to run it since? I was able to run the script successfully, so i’m guessing it was just a temporary timeout.


  • Author
  • New Participant
  • November 2, 2025

​Thanks @mitchell.hudson . I was able to make good progress and have further isolated the issue.  When I use the script with the API token from my personal Monday account, it works perfectly.  The output of the script is: 

***Ready for the request call.***
***Returned from the request call.***
{'data': {'boards': [{'id': '18325711780', 'name': 'The Second board'}, {'id': '18325710648', 'name': 'First Personal Monday Board'}]}, 'extensions': {'request_id': 'b9cec01d-8a23-933b-adf1-a5c757f4725e'}, 'account_id': 32285908}

But if the only thing I change is using my API token for my work Monday account, I get the error and the output of the script is:

***Ready for the request call.***
***Returned from the request call.***
{'errors': [{'message': 'Request timed out', 'extensions': {'code': 'REQUEST_TIMEOUT'}}], 'extensions': {'request_id': 'a4fb7d37-dcdf-9479-be43-a63f9bfb3d8c'}, 'account_id': 13536981}

I know there are others in my large company using the API. I will post a message to the Slack channel for Monday questions. Do you have any ideas?


Revilre
Forum|alt.badge.img+1
  • November 2, 2025

@StevenBennett I would posit that its possible that your organization has IP based restrictions, so at some point a range such as the work IP addresses were white listed. However if you’re connecting from another IP range, or a hosting provider, it may be rejecting the IP. I know the handling of IP blocking isn’t straight forward in the monday infrastructure - it doesn’t necessarily return a 403 for example with a clear error message as its dropping it at what amounts to a firewall. So it could result in a timeout from a upstream service not responding to the requests.