I am trying to send http requests to the API provided by HelloSign.com........To test what I was doing, I used Git BASH, and the following command completed correctly (I have changed the key and some of the user / document information, but the syntax is exactly as I sent it):
curl -u "9Ca9C0972a4e1ae439Cee8e5d
54CCa88103
1ba247e085
807a847aa8
6Ca080d6a:
" "
https://api.hellosign.com/v3/signature_request/send" -F "title=rjr.docx" -F "subject=Rick's Test Document" -F "message=Please sign this contract" -F "signers[0][email_address]
=rrudolph@
test.com" -F "signers[0][name]=Rick Rudolph" -F "file[0]=@c:/docpath/rjr.d
ocx" -F "test_mode=1"
I opened up a VBA module, and set a reference to the Microsoft XML 6.0 library. Then I tried the following:
Public Function TestAPI()
Dim StrAPI As String
Dim request As MSXML2.ServerXMLHTTP60
StrAPI = " -u '9Ca9C0972a4e1ae439Cee8e5d
54CCa88103
1ba247e085
807a847aa8
6Ca080d6a:
' '
https://api.hellosign.com/v3/signature_request/send' -F 'title=rjr.docx' -F 'subject=Rick's Test Document' -F 'message=Please sign this contract' -F 'signers[0][email_address]
=rrudolph@
test.com' -F 'signers[0][name]=Rick Rudolph' -F 'file[0]=@c:/docpath/rjr.d
ocx' -F 'test_mode=1'"
Set request = New ServerXMLHTTP60
request.Open "Post", StrAPI, False
request.send
Debug.Print request.StatusText
End Function
This code created an error at : request.Open "Post", StrAPI, False
The error was:
runtime error '-2147012890 (80072ee6)
System error: -2147012890
The only change I made to the string that worked in Curl was to change the double quotes to single quotes inside the string.
Thanks in advance as this is a stumbling block in a new process we are trying to develop.
Open in new window