Skip to main content

Hey Team,

Having a heck of a time getting a successful result from a connection attempt to our instance of Jira Service Management.  I have followed the API documentation I think to a “T,” but need a bit of a push if anyone has implemented this before.

The ultimate goal is to eventually create new Organizations after they show up in another internal system, but during my troubleshooting, I am scaling back and just trying to get a successful result by using GET Organizations.  Here is the setup:

 

 

After this step, I provide my Jira credentials and successfully connect.

 

 

Here is the error:

The only odd thing I found is in the API doco, it also shows an additional HTTP Header of “Authorization: Bearer <API Token.”  I originally did not add this since my assumption was since I could successfully connect using my credentials, along with the note of “Authentication headers are included automatically,” this was not needed.  However, I did generate a token and added this header, but it resulted in the same error.

I did play around with the HTTP method and was able to somehow bypass the error by using PATCH, but the result was a 401 - Bad Request, and I believe I need to use PUT to create a new Organization and not PATCH. But again, for now I am trying to scale back by getting a simple example to work.  FWIW, when I enter the main URL in my browser, I get a listing of Organizations.

Hi @PatrickD 

Try using AI to help you create a custom Zap action.

 


Thank you, Troy.  I have tried this option as well to no avail.  I feel it may have something to do with the Headers but haven’t been able to resolve as of yet.  When I run the call through Postman (API testing tool), it works.

Only change to the original post is I have added an Authorization Header in the format of Basic myemailaddress:<JiraAccessToken>.

 

I was hoping someone in the community has successfully made this connection and could share their setup.


I suspect that the basic header you are sending isn’t base64 encoded. To most straightforwardly confirm this, I would go to webhook.site, get a URL from there. Replace the jira URL you are putting into both Zapier and Postman with that URL. Then send requests. Look at webhook.site to see the two requests that came through. Compare the headers - that will probably tell you where the meaningful difference is. At that point, it’s just mechanical work to make whatever change in Zapier will bring it in line with Postman! 


Hey Raydeck,

Thank you for the feedback.  I found several references regarding the Jira token needing to be base64 encoded, which did not work, but nothing beyond that.  I attempted to configure Zapier identical to Postman and even had Atlassian support on chat at the same time and none of their recommendations worked.

Regardless, I decided to move on and I ended up using a Code by Zapier action using a Python script instead and this worked the very first time.  I simply used the headers outlined in the Jira API documentation.  Only difference is the Authentication needed to be Basic vs. Bearer:

 

headers = {    "Accept": "application/json",    "Authorization": f"Basic {credentials}",    "Content-Type": "application/json"}

We have the exact same issue.

 

 

The “Troubleshoot” doesn’t help at all. If it would at least show the exact request and response, but nothing.

 

It works perfectly fine in Postman.


Same issue here. Tried different combinations for Authorization header as described in the JIRA docs:

Header-Name: Authorization
Header-Value: Basic base64EncodedValueFrom(email:jira_token)


But still not working:

 


btw: I can also confirm that a Postman request with the exact same basic auth header successfully returns the expected JSON response.


Reply