16
Views
7
Comments
Solved
JIRA REST API Authentication using Bearer + Token
Application Type
Reactive
Service Studio Version
11.55.38 (Build 64325)
Platform Version
11.18.1 (Build 38276)

Hi,

I am trying to consume JIRA REST API in OutSystems Reactive application. The issue i am facing is setting up of Authentication method. It needs Basin authentication to be setup but it does not allow me to do so as the API key which i am using as password is longer than 128 characters. So i started trying "Bearer +API  Token" option. Even with this option i am not able to establish the connect/authenticate using No Authentication option(in which i am using "Bearer +API Token" as header. Pasted all the screen shots below here. Please help me to resolve this issue or suggest any alternative?. Btw i tried putting Authorization in double quotation  and without quotation as well but both times it doesn't work






6.png
3.png
2.png
5.png
4.png
2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

You can use BinaryToBase64 together with TextToBinaryData to encode a string into Base64. 

In the OnBeforeRequest event, add the Authorization header using the AddHeader action from HTTPRequestHandler. 

Set the header value like this: 

"Basic "+  BinaryToBase64(TextToBinaryData("username:password"))

Be sure to replace "username:password" with your actual credentials.

_____
If the authentication details are static, you can also pre-encode them once and then use the encoded value directly. 

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @Abhishek Babdi ,

You shouldn’t wrap the Authorization header in quotes("")  .  Just use Bearer + APIKey directly.

A 403 – Forbidden error typically points to either a firewall/security restriction (where you’d need clearance) or insufficient scopes/permissions on your API key.

Since authentication and authorization in JIRA depend on the app type, it’s best to confirm the correct setup with the administrator of your organization’s JIRA instance.

UserImage.jpg
Abhishek V B

Hi @Mihai Melencu, yes I tried it without double quotation(you can see in the first two images)but it still doesn't work. And the REST API call to JIRA is working correctly on Postman with Basic authentication, where I am using Email id as username and password as Api key. So I don't think the issue is related to scope of api key here. Thanks for your reply.

2026-01-28 16-57-48
Mihai Melencu
Champion

If you’d like to use the Basic Auth method, take a look at this discussion: New Jira REST API Token length is not supported on Basic Authentication

It looks like the issue you’re facing is the same one described there. 

UserImage.jpg
Abhishek V B

Yeah true, I already went through that post there is no specific snapshot of how it was implemented. I already replied to that thread asking for solution. Hoping someone would be able to solve that!. Thanks btw.

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

You can use BinaryToBase64 together with TextToBinaryData to encode a string into Base64. 

In the OnBeforeRequest event, add the Authorization header using the AddHeader action from HTTPRequestHandler. 

Set the header value like this: 

"Basic "+  BinaryToBase64(TextToBinaryData("username:password"))

Be sure to replace "username:password" with your actual credentials.

_____
If the authentication details are static, you can also pre-encode them once and then use the encoded value directly. 

2024-01-12 13-38-48
Abhishek Babdi

followed all the things that you said but still getting 404 error. Attaching my OML in here for your reference. changed company name to xyz and username & password i changed just to show it to you here. please check if i am doing something wrong in this. On the front end side i am using Get Issues button to hit that REST API.

I changed the company to xyz so to share it in here and same with usernameand password as well

JiraRestAPI.oml
2026-01-28 16-57-48
Mihai Melencu
Champion

If you see a 404, it means your authorization is working fine. The error just means either:

  • The custom field option doesn’t exist, or

  • You don’t have access to view that field

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.