TylonHH
December 10, 2023, 4:27pm
1
Hello,
I made an API token with all read scopes. Then I tried this curl:
curl --location 'https://eu1.make.com/api/v2/scenarios/consumptions?teamId=12XXXX&organizationId=95XXXX' \
--header 'Authorization: e99XXXX-XXXX-44af-8343-XXXXXXXX'
and get this:
{
"detail": "Access denied.",
"message": "User is not logged in.",
"code": "IM015"
}
Hello @TylonHH ,
One thing I’ve noticed so far here is the Authorization header. It should be more like
‘Authorization: Token e99XXXX-XXXX-44af-8343-XXXXXXXX’
Seems you’re just missing the word Token in there.
Maybe give that a try and see if it helps!
TylonHH
December 10, 2023, 7:25pm
4
I tried that also, with less luck
curl --location 'https://eu1.make.com/api/v2/scenarios/consumptions?teamId=XXXXX&organizationId=XXXXX' \
--header 'Authorization: Token e99XXXX-XXXX-44af-8343-XXXXXX'
{
"detail": "Not authorized.",
"message": "Access denied",
"code": "SC401"
}
TylonHH
December 10, 2023, 7:36pm
5
Is there a full list of all codes? I dont find the given code here: https://www.make.com/en/api-documentation/http-status-codes
I also added:
–header ‘Content-Type: application/json’ \
Actually, you need to be on a paid plan to use Make API.
Can you confirm that before going into this further?
TylonHH
December 10, 2023, 7:57pm
7
yes, sir
Current plan - Core
Right now I’ testing the connectiong with all scopes enabled
What does User is not logged in. (IM015) mean
I’m not really sure, not used this specific function before.
What I would do, and I would if I had the time right now, is get it working in Postman then copy the cURL from there.
TylonHH
December 10, 2023, 8:09pm
9
I’m working with postmen
LOG
GET https://eu1.make.com/api/v2/users/me
401
96 ms
GET /api/v2/users/me HTTP/1.1
Content-Type: application/json
Authorization: XXXXX-8d25-4907-8dcf-XXXXXX
User-Agent: PostmanRuntime/7.35.0
Accept: */*
Postman-Token: XXXX-78b3-49d0-b820-XXXXX
Host: eu1.make.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
HTTP/1.1 401 Unauthorized
Date: Sun, 10 Dec 2023 19:58:49 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 77
Connection: keep-alive
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9999
X-RateLimit-Reset: 1702238390
Set-Cookie: userId=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: sid=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT
authType: session
api-version: 4.22.0
CF-Cache-Status: DYNAMIC
Server: cloudflare
CF-RAY: 83381099691XXXXX-TXL
{"detail":"Access denied.","message":"User is not logged in.","code":"IM015"}
Interesting… I Just tried cURL from command line on Mac and it worked for me.
When I get the incorrect org ID I get a 403 error.
TylonHH
December 10, 2023, 8:20pm
11
@Michaela-Inactive please have a look
Also I should mention I’m in US so might be a server issue.
I don’t have an EU account to test with right now, sorry.
I also don’t see Token after Authorization in your last Postman result, but I don’t know if Postman omitted it.
I omitted “Token” from my Authorization string then it gave me an error: User is not logged in. Code IM015.
You might want to create a ticket .
TylonHH
December 10, 2023, 9:43pm
13
THAT was a good hint. You said you’re US.
So I checked the url of my webclient url. It’s
https://eu 2 .make.com/user/api
So I changed the POST url to eu2 and voilá
Status: 200 OK
Heya @TylonHH
Awesome to see that you found out what was causing this with the assistance of @Donald_Mitchell ! Sometimes it really is the littlest things that solve the big questions, right?
Anyway, thanks a lot for stepping back into the thread and sharing the details of the problem and how you resolved it. Much much appreciated