My webhook successfully gets a token back, but I cannot use it any anything as Jira just fails to grab it. I've tried putting it into a variable, a comment or directly into the next webhook but its always blank.
My response is this;
Content-Type: application/vnd.appd.cntrl+json;v=1
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
Content-Length: 700
Connection: keep-alive
{ "access_token": "xxx", "expires_in": 5 }
To access the token I've tried
{{webResponse.body.access_token}}
{{webhookResponse.body.access_token}}
{{webResponse.body.substringBetween("access_token\":", ",") }} - this works but leaves the " marks at beginning an end of the token, and trying to find the token between the 2 "'s doesnt work.
Anyone have an idea?
Managed to create a "smart" variable with this
{{webhookresponse.body.substringBetween("access_token\": \"", "\",\"expires") }}
Hi @Terry Dance ,
Probably you'd need to follow the steps at: https://confluence.atlassian.com/jirakb/manually-formatting-webresponse-to-json-in-automation-1252006605.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.