Trouble Connecting to Make.com API

I’m trying to connect to Make.com’s API but the examples in the documentation aren’t working for me. Perhaps someone that already jumped through these hurdles can point me in the right direction (already read the docs and Googled profusely).

I created the Token and set it to all scopes just to make sure that the 403 responses aren’t a scope issue.

The weird thing is that some endpoints like the /api/v2/ping and /api/v2/organizations are working just fine.

I’m trying to access the /api/v2/scenarios endpoint…
If I try to connect to the endpoint by navigating to the URL on my web browser, it works just fine. The URL is:
https://us1.make.com/api/v2/scenarios?organizationId=123456

But the Python code in the documentation uses the eu1.make.com subdomain instead of us1.make.com.

If I try to access with eu1.make.com I get the following error:
{"detail":"Access denied.","message":"Permission denied","code":"SC403"}

If I try changing the connection settings to us1 like this:
conn = http.client.HTTPSConnection("us1.make.com")

I get the following error:
{"detail":"Forbidden to use token authorization for this organization.","message":"Permission denied","code":"SC403"}

I also tried accessing with a cURL request instead of Python, but the same thing happens

The browser is connecting because it picks up the login credentials from the cookies, so all points to it being a Token authorization problem.

Does anybody have a code snippet of a working connection? This is my full code without the private data:

import http.client
conn = http.client.HTTPSConnection("eu1.make.com")

headers = { 'Authorization': "Token abcdefab-1234-5678-abcd-112233445566" }
conn.request("GET", "/api/v2/scenarios?organizationId=1", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Thanks in advance!

Update: I’m seeing that I have both organizations in eu1 and us1, so this would explain a possible conflict when trying to load scenario from another but it also doesn’t work if I try to load an eu1 scenario from an eu1 organization.

1 Like

Hi :wave:t5:

I am not sure whether the issue persists but it seems to me like you probably tried to use the API for organization on a FREE subscription plan.

Make API work only for paid organizations.

In case the issue would happen also for paid organization(s) I would recommend checking that with Make support which might have better insight to their API and your specific API calls.


Cheerio

2 Likes