Hello Team,
I am using VBA code to get the issues from JIRA. But I am getting the error
{"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}
Note working fine in Postman using Basi-Auth (Email and API token)
Username - vxxxx@gmail.com
APITOKEN = APITOKEN
Set JiraService = CreateObject("WinHttp.WinHttpRequest.5.1")
UserNamePQ1 = UserPassBase64
With JiraService
sURL = "https://<<JiraName>>.atlassian.net/rest/api/3/issue/KAN-8"
.Open "GET", sURL
'.SetRequestHeader "Content-Type", "application/json"
'.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Authorization", "BasicAuth Username:APITOKEN"
.SetRequestHeader "Content-Type", "application/json"
.Send
JiraService.ResponseText
End With
Hi @Vivek K Are you sure you have authenticated yourself?
Logging in requires encoding the username and Token to Base64.
.setRequestHeader "Authorization", "Basic " & EncodeBase64(strAtlassianEmail & ":" & strAtlassianToken)
The function below requires that you add "Microsoft XML, v 3.0" under Reference (Tools->Reference)
Private Function EncodeBase64(text As String) As String
Dim arrData() As Byte
arrData = StrConv(text, vbFromUnicode)
Dim objXML As MSXML2.DOMDocument
Dim objNode As MSXML2.IXMLDOMElement
Set objXML = New MSXML2.DOMDocument
Set objNode = objXML.createElement("b64")
objNode.DataType = "bin.base64"
objNode.nodeTypedValue = arrData
EncodeBase64 = Replace(objNode.text, vbLf, "")
Set objNode = Nothing
Set objXML = Nothing
End Function
Yes, that was my point
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.
Yes, when I use a user who has the right permissions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the Atlassian Community!
This is most likely to be down to the user that you are using to log in and issue the commands not having the permission to see or work with the issue you are trying to use.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.