API returns 415

Lisa H August 23, 2022

Hi all,

I'm trying to get started with communicating between excel and Jira using VBA.  I'm starting very basic.  This is what I've got:

 

Dim request As New WinHttpRequest
request.Open "GET", "https://xxxxxx.jira.xxxx.com/jira/rest/api/2/serverInfo?doHealthCheck=true"
request.Send "(""username"":""" & USER & """,""password"":""" & PASS & """)"

This returns an error of 415.  Can anyone help me figure out what is wrong?

1 answer

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2022

Hi @Lisa H 

Welcome to the Community

If it is Jira DC, it accepts Basic Authentication via Header

https://docs.microsoft.com/en-us/windows/win32/winhttp/authentication-in-winhttp

Can you try once and see if it accepts the request

Thanks,
Pramodh

Lisa H August 24, 2022

Thank you so much for being willing to help!  Very appreciated.

I added this line and am now getting a 500 error:

request.SetRequestHeader "Authorization", "Basic base64Encoded" 'NEW PASSWORD WITH TOKEN

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 25, 2022

Hi @Lisa H 

Can you help me with the Platform from where you are making the call? I would check it from my end and let you know.

Do help me with the link & Screenshot.

Thanks,
Pramodh

Suggest an answer

Log in or Sign up to answer