In my API tests, while not using a browser, which asks authentication, I am trying to authenticate directly on my code. I am sending the follow POST request:
I receive the token in the response, as follow:
I can't see any errors in the response, so everything looks fine. After that, I try to send new requests using the token, as follow:
But I receive as the response a message saying that I am not authenticated.
This server could not verify that you are authorized to access
the URL "/mgmt/tm/asm/signature-sets".
You either supplied the wrong credentials (e.g., bad password), or your
browser doesn't understand how to supply the credentials required.
What I am doing wrong in this case?
Are you sending the token as a header?
curl -X GET -H "X-F5-Auth-Token: ABCDEFGHIJKLMNOPQRSTUVWXYZ" "https://10.0.0.1/mgmt/tm/asm/signature-sets"
Basically this was the issue. I wasn't sending as a header :)
Pleased you got it working :)