Edge Management API Unauthorized

Hi Team, Sorry for posting this topic if this had but i did tried to search but couldn't get my answers i need.

Objective: Access Management API via node js and perform various tasks such as creating identity etc.

curl -k -X POST "https://zta.zitiexample.net:8441/edge/management/v1/authenticate?method=password"
-H "Content-Type: application/json"
-d '{
"username": "zitiadmin",
"password": "mypassword"
}'

It seem like login no problem and i get bunch of information including the token
"lastActivityAt":"2025-02-01T12:04:50.968Z","token":"071741d9-e598-4c95-b49f-408e6ea8fde5","expirationSeconds":1800,"expiresAt":"2025-02-01T12:34:50.968Z"},"meta":{}}

But after here I will not be able to perform any API GET / POST

{"error":{"cause":{"code":"UNHANDLED","message":"UNAUTHORIZED: The request could not be completed. The session is not authorized or the credentials are invalid"},"code":"UNAUTHORIZED","message":"The request could not be completed. The session is not authorized or the credentials are invalid","requestId":".kSLATqZKJ"},"meta":{"apiEnrollmentVersion":"0.0.1","apiVersion":"0.0.1"}}

is there anyone who done this before and can assist me?

Ok I read up (always remember must read up!)

clearly shown Authorization: should be zt-session instead of standard bearer

2 Likes

Glad to see you got this sorted! Always read up... :slight_smile: