Error in post webhook - Response HTTP status: 401

lucie_bednarikova December 20, 2024

I have a problem with this request and I don't know what could be wrong with it, can someone help me please?

 

 

Web request URL : https://api.freelo.io/v1/custom-field/add-or-edit-value/

HTTP method : POST

Web request body : Custom data

Custom data : 

{ "custom_field_uuid": "{{extID.get(webhookData.project.name)}}",

"value": "{{createdIssue.key}}",

"task_id": {{createdIssue.customfield_10084}} }

 

Content-Type : application/json

Authorization : API key

 

In audit log is this error:

 

Send web request
Unable to publish the web request - received HTTP status response:
401
Error found in the HTTP body response:
Bad Credentials

1 answer

0 votes
Niranjan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2024

Hi @lucie_bednarikova ,

This error is usually when the credentials for the user performing the request aren't provided in the right way or are invalid. i.e. the service wasn't able to identify the user. I believe that your format of the token is the issue.

The format for API token in Cloud jira is -H "Authorization: Basic *****"

 

lucie_bednarikova December 20, 2024

Hi @Niranjan 

thank you for your help. 

So what exactly should I put in Authorization? I tried "Basic API key" and still the same error.

Niranjan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2024

Here is an sample format for Jira

curl -D- \ -X GET \ -H "Authorization: Basic ZnJlZDpmcmVk" \ -H "Content-Type: application/json" \ "https://your-domain.atlassian.net/rest/api/2/issue/QA-31"

lucie_bednarikova January 9, 2025

I am sorry, but I still do not get it. What shoud I change please? 

As Authorization I have "Basic JiraToken".

 

Snímek obrazovky 2025-01-10 085517.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events