Jump to content
  • 0

Connect to Caspio Table From Excel/VBA


RonAnderson

Question

Hi, anyone out there with VBA knowledge and how to connect VBA to a Caspio database? I could really do with your help... Ultimately I'd like to automate this using VBA. Here's the VBA code which crashes at the .send line, returning a "Access Denied" error.

Sub GetCaspioData()

Dim hReq As Object, Json As Dictionary
Dim sht As Worksheet

authKey = <myAuthKey>

Set sht = Sheet1

Dim strUrl As String
    strUrl = "https://myaccount.caspio.com/ui/apps/myApp/tables/myTable/open"
Set hReq = CreateObject("MSXML2.XMLHTTP")
    With hReq
        .Open "GET", strUrl, False
        .SetRequestHeader "Authorization", "Bearer " & authKey
        .Send
    End With

Dim response As String
    response = hReq.ResponseText
    
    MsgBox response
End Sub

Many thanks, Ron

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...