From 4ed6702104033c9b07a733b2320a4160fd6feaa7 Mon Sep 17 00:00:00 2001 From: chrisw-ibm <104161708+chrisw-ibm@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:19:31 -0400 Subject: [PATCH] Include Bearer before the $AUTH_TOKEN I was getting the error `{"errors":[{"reason":"Not authenticated","message":"An Authentication object was not found in the SecurityContext"}]}` before I added the missing `bearer` from the code snippet. Once added my api calls worked --- api/mon-curl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/mon-curl.md b/api/mon-curl.md index 31dedbd..a3883fd 100644 --- a/api/mon-curl.md +++ b/api/mon-curl.md @@ -49,7 +49,7 @@ Use IAM tokens to authenticate with the {{site.data.keyword.mon_full_notm}} serv In a cURL command, add the following options to authenticate with the {{site.data.keyword.mon_full_notm}} service by using an IAM token: ```text --H "Authorization: $AUTH_TOKEN" +-H "Authorization: Bearer $AUTH_TOKEN" -H "IBMInstanceID: $GUID" -H "SysdigTeamID: $TEAM_ID" ``` @@ -110,7 +110,7 @@ To run a cURL API query and authrnticat by using the IAM token, complete the fol 3. Run the cURL API query. ```text - curl -X / -H "Authorization: $AUTH_TOKEN" -H "IBMInstanceID: $GUID" -H "content-type: application/json" + curl -X / -H "Authorization: Bearer $AUTH_TOKEN" -H "IBMInstanceID: $GUID" -H "content-type: application/json" ``` {: codeblock}