Hi, I have an Excel application which uses extensive VBA. I'm able to seamlessly download data from my Caspio database and place it on to my spreadsheet but the next day I have to renew the token. I know there's a method of refreshing the token automatically and here is where I'm stuck. Does anyone have experience of VBA code and how this can be written using credentials held in ARC REST API Client?
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.
Question
RonAnderson
Hi, I have an Excel application which uses extensive VBA. I'm able to seamlessly download data from my Caspio database and place it on to my spreadsheet but the next day I have to renew the token. I know there's a method of refreshing the token automatically and here is where I'm stuck. Does anyone have experience of VBA code and how this can be written using credentials held in ARC REST API Client?
Here's the coded I'm trying to use:-
Sub GetRefreshToken()
Dim getTokenUrl As String
getTokenUrl = "https://xxxxxxxxx.caspio.com/oauth/token&code=" & "&client_id=myCLIENTstring&client_secret=myCLIENTsecret"
authKey = "originaltoken"
Dim Http As MSXML2.XMLHTTP60
Set Http = CreateObject("MSXML2.XMLHTTP.6.0")
With Http
.Open "GET", getTokenUrl, False
.setRequestHeader "Content-Type", "Bearer " & authKey
.send ("")
End With
Do While Http.readyState <> 4
Loop
Response = Http.responseText
End Sub
Kind regards, Ron
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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.