Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Which url i have to use in callback url if i connect with jira

I have a task in jira, and I want to use a automation rule.

With this rule I want to run a pipeline in bitbucket.

I create an oauth consumer in the repository, but when I generate an access token and make the post request I get and status code 500.

Captura de Pantalla 2022-06-10 a la(s) 13.07.22.pngCaptura de Pantalla 2022-06-10 a la(s) 13.06.52.png



1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 14, 2022

Hello @Mauricio Mondragon ,

Thank you for reaching out to Atlassian Community!

With regards to the call-back URL, it's only really needed if you are using an OAuth flow that involves a web browser. From my understanding, you are trying to build an automation in Jira that just involves API calls, so you can put any URL as the callback URL such as https://localhost or, as it will not impact the token that will be provided.

Having said that, in order for us to investigate further I would need to have more information about what are the details of your API call : 

  • What is the OAuth flow you are currently implementing to get the token for authentication? Is it client credentials ? You can find all the available OAuth flows in our API reference documentation : 
  • Which is the specific endpoint of the API you are trying to call? 
  • Could you please share with us the content of the body and all the headers you are using in your request to the API? 
  • If you try to run the same API call locally, using the same authentication method as your Jira automation, do you get the same error? 

Thank you, @Mauricio Mondragon .

Kind regards,

Patrik S 

hi @Patrik S 


Thank you for replying.


In my automation rule I´m send web request to this url

My headers are

Content-Type application/json

Authorization Bearer + token

I tried generating the token by client credentials and Authorization code, but the status response is 500 by this methods.

My body request is:

"target": {
"ref-type": "branch",
"type": "pipeline_ref_target",
"ref_name": "master"


I'm based on this documentation

In this documentation mentioned a basic authorization but with this type of auth I get this response:

Bitbucket Cloud recently stopped supporting account passwords for API authentication. See our community post for more details: App passwords are recommended for most use cases and can be created in your Personal settings: For more details on API authentication methods see our documentation:


If I use an app pasword I get this response:

* Basic <app_password>

400 "Invalid Authorization header"

* Bearer <app_password>


  "type": "error",
  "error": {
    "message": "Access token expired."
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 17, 2022 • edited

Hello @Mauricio Mondragon ,

Thank you for providing more details.

I think the issue here is that you are not providing the correct authentication credentials to the API calls in your automation.

My suggestion here is that you use Oauth client credentials flow, so when you create an Oauth consumer under your workspace settings, you will be provided with a key and secret.

The automation would consist in two steps : 

1. Get the access_token by providing the credentials of your OAuth consumer :

You need to call the access_token endpoint to get a Bearer token that will be used in the later step to call the actual Bitbucket API you are looking for. You need to configure the step in your automation as per the below example: 

The parameters used are the following : 


Headers : 

authorization : Basic <Base 64 encoded "key:secret"> Content-Type : application/x-www-form-urlencoded Body: grant_type=client_credentials

Please note that in the authorization header you have to provide the base64 encoded value of your OAuth key and secret. On mac you can base64 encode a string using the following command :

echo -n "KEY:SECRET" | base64


2. Call the Bitbucket API endpoint providing the access_token from the previous step

You need to use the access_token you got in the step above to authenticate the call to Bitbucket API endpoint you want, as the following example : 

api call jira automation.png

The parameters are : 

URL:< Endpoint >

Headers : 
Content-Type : application/json
Authorization : Bearer {{webResponse.body.access_token}}

Could you please try configuring as the suggestion above and check how it goes? 

Thank you, @Mauricio Mondragon .

Kind regards,

Patrik S

Like Mauricio Mondragon likes this

hi @Patrik S 

I followed your instructions and it works for my automation rule.

Now when I request run a pipeline I get a successful response.

Thanks for your help. This was very helpful.

Like Patrik S likes this
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 24, 2022

Hey @Mauricio Mondragon ,

You're very welcome!

Happy to have been of some help :) 

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events