Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication error when trying to create Confluence page via automation web request

Esther Strom
Community Champion
February 25, 2021

I'm trying to use a Jira automation rule to create a new Confluence page whenever a task is created in a specific project. 

There's an answer here that indicates it can be done via a web request.

I've set up my rule and am testing it using the Validate Your Webhook Configuration at the bottom of the rule. I keep getting this error response:

2021-02-25 12_32_19-notifications.html#.png

I'm sending the Authorization header correctly, as far as I know; the blurred value is the base64 encoding of my account's email address:my API token.

2021-02-25 12_32_49-notifications.html#.png

If I just paste that URL into my browser, I get the expected json response of page data, so why is it not working via the webhook? I am a site-admin for both Jira and Confluence and have admin access to the space I'm trying to create the page in.

1 answer

1 accepted

1 vote
Answer accepted
Hana Kučerová
Community Champion
February 25, 2021

Hi @Esther Strom ,

I was able to make this work using Automation and Send web request action. My configuration is the same. I believe Authorization header is ok, but error 401 indicates, there's something wrong with the authorization process.

Please, did you try to use another user / send another request type, if the error is the same?

Esther Strom
Community Champion
February 25, 2021

Thanks for the reply, Hana. We use Atlassian Access with SSO, so it's not really possible for me to try another user without actually getting another real user to create a token that they then share with me. 

I'm wondering if it's ignoring the Authorization header and running as the Jira automation user.

 

UPDATE: I tried a different base64 encoding tool and it gave me a completely different string. Tried the new string and it worked. Not sure what happened with the first one.

Like Hana Kučerová likes this
Hana Kučerová
Community Champion
February 25, 2021

@Esther Strom Maybe you can try some service like https://requestbin.com/ to be able to see, what is Jira sending... I use it a lot for debugging...

Like Esther Strom likes this

Suggest an answer

Log in or Sign up to answer