Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,377
Community Members
 
Community Events
165
Community Groups

Automation - Build Authorization Header Value from Previous Web Response

Edited

Hello

I have a web response that validates correctly

jira-screeshot-1.png

The payload returned is:

{
  "access_token": "<snip>",
  "refresh_token": "<snip>",
  "scope": "useraccount",
  "token_type": "Bearer",
  "expires_in": 1799
}


I do have "Delay execution of subsequent rule actions until we've received a response for this web request" checked

I have another send web request that needs to use the access_token in its Authorization header value like so:

jira-screenshot-2.png

The full value is Bearer {{webResponse.body.access_token}}

Thus far I have not been able to successfully build this string :( and validating the second request returns authorization failed. I have tested copy/pasting the access_token into the header and it does work 

UPDATE ***

I believe the token is being passed at this point (after testing) however now it seems like the Web request URL isn't accepting the custom field value

https://some/api/endpoint?number={{issue.customfield_123456.value}}

Any help is appreciated 

1 answer

1 accepted

1 vote
Answer accepted

Looks like I've been able to answer this myself

The custom field value is text so it looks like in both cases all I had to do was remove the .value 

{{issue.customfield_123456}} worked.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira Service Management

Coming Soon: Insight Changing to Assets

The 2020 acquisition of Mindville added powerful asset and configuration management capabilities to Jira Service Management in the form of Insight. Following the completion of that integration, custo...

273 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you