I'm trying to use OAuth1.0 to authenticate to an API. I am getting an error when it's preparing the http request.
The code is very simple. It builds just fine until I add the authentication part.
Any ideas?
ERROR - WebClient.Execute: -2147210493 (11011 / 80042b03), An error occurred during execute
-2147210492 (80042b04): An error occurred while preparing http request
-2146232576 (80131700): Automation error
Function Get_SingleRecord() As String
Dim Client As New WebClient
Client.BaseUrl = kBaseURL & "/"
' Setup authenticator
Dim Auth As New OAuth1Authenticator
Auth.Setup _
ConsumerKey:=kconsumer_key, _
ConsumerSecret:=kconsumer_secret, _
Token:=koauth_token, _
TokenSecret:=koauth_token_secret
Set Client.Authenticator = Auth
' Use GetJSON helper to execute simple request and work with response
Dim Resource As String
Dim Response As WebResponse
Resource = "restapi/1.0/object/contact/3"
Set Response = Client.GetJson(Resource)
End Function
I'm trying to use OAuth1.0 to authenticate to an API. I am getting an error when it's preparing the http request.
The code is very simple. It builds just fine until I add the authentication part.
Any ideas?
ERROR - WebClient.Execute: -2147210493 (11011 / 80042b03), An error occurred during execute -2147210492 (80042b04): An error occurred while preparing http request -2146232576 (80131700): Automation error