title: Access JIRA with VBA Excel 2010
body: <p>I want to automate Excel reports in JIRA using VBA and Excel, I am trying to access JIRA with VBA to export data to Excel. So, I start with the authentification and then try to export data using this code :</p>
  
  <pre><code>Private JiraService As New MSXML2.XMLHTTP60
  Private JiraAuth As New MSXML2.XMLHTTP60
  
  Sub JIRA()
  
    With JiraAuth
         .Open "POST", "https://jiralink/rest/auth/1/session", False
         .setRequestHeader "Content-Type", "application/json"
         .setRequestHeader "Accept", "application/json"
         .send " {""username"" : """username""", ""password"" : """password"""}"""
         MsgBox .Status
         If .Status = "200" Then
             sCookie = "JSESSIONID=" &amp; Mid(sErg, 42, 32) &amp; "; Path=/" &amp; sPfad
             Login = True
         End If
    End With
  
    With ActiveSheet.QueryTables.Add(Connection:= _
          "URL;https://jiralink/sr/jira.issueviews:searchrequest-excel-all-fields/temp/SearchRequest.html?jqlQuery=project+%3D+NAME+AND+Sprint+%3D+1+ORDER+BY+priority+DESC%2C+updated+DESC&amp;tempMax=1000" _
          , Destination:=Range("$A$1"))
          .RowNumbers = False
          .FillAdjacentFormulas = False
          .PreserveFormatting = True
          .RefreshOnFileOpen = False
          .BackgroundQuery = True
          .RefreshStyle = xlInsertDeleteCells
          .SavePassword = False
          .SaveData = True
          .AdjustColumnWidth = True
          .RefreshPeriod = 0
          .WebSelectionType = xlEntirePage
          .WebFormatting = xlWebFormattingNone
          .WebPreFormattedTextToColumns = True
          .WebConsecutiveDelimitersAsOne = True
          .WebSingleBlockTextImport = False
          .WebDisableDateRecognition = False
          .WebDisableRedirections = False
          .Refresh BackgroundQuery:=False
      End With
  
  End Sub
  </code></pre>
  
  <p>I've get ERROR : 403 forbidden
  Can anyone help me please ? 
  Sorry, i am new to VBA and JIRA</p>