Are there VBA classes that generate JWT for DocuSign OAuth2? - vba

We are using MicroSoft Access 2016 32-bit VBA to call DocuSIgn API for generating and sending envelopes, and reading DocuSign data. We are trying to convert from DocuSign's legacy authentication to OAuth2. We do not have the option at this time to change to another application.
I am stuck on generating the JWT. I have successfully used JWT.IO to manually generate a JWT with the proper Header, Body, and Signature. I cannot figure out how to generate it programmatically in VBA. I have seen some code on GitHub but not sure how to implement it.
Are there libraries in VBA reference I need to include?
Can anyone point me in the right direction to get JWT in VBA?
Thank you.

DocuSign support finally gave me the alternative to use Authorization Code Grant with an extended refresh token. So much easier!
I did try using Koen Rijinsent's https://gist.github.com/krijnsent/7a90db8567504aa89a448132796792b3 that he provided via email, in addition to his ModHash. I was almost there, but his hash does not support RSASHA256. Thank you Koen for your efforts to help me.

Related

Create a JWT in VBA RSASHA256

I have automated the use of Docusign from an Access Database using https calls from VBA
Now I have to change from their legacy authentication to use OAuth 2.0
I need to create a JWT and then use this to exchange for a Docusign API Access Token
I can create and encode the Header & Payload but need to generate the Signature part by encoding the Header and Payload to Base64 (which I can do) but then need to use the Private Key (also have a Public Key) which I have from Docusign and use something like RSASHA256 (as per JWT.io) to generate the Signature to add to my JWT
Does anyone know how I can create this signature element from VBA please
Thank you
you could try some of this code (part of a repository I made): https://github.com/krijnsent/crypto_vba/blob/master/ModHash.bas
You do need .NET 3.5 or greater on your system, as it's used by the hashing algorithms (System.Security.Cryptography).

Does OAuth.tools provide any kind of API?

I am wondering if OAuth.tools provides any sort of API to control its functionality. Does it provide an API?
OAuth.tools is almost-entirely a client-side web application that runs entirely in the user's browser. This is a really important aspect of its design considering the kind of data it works with. This kind of design doesn't lend itself to programability in the traditional API sense.
That said, you can provide a JWT on the hash of the URL. This will open all existing flows, and add a new JWT decode flow with the provided token. The format of the URL is this:
https://oauth.tools/#jwt=$JWT
An example would be this.
When clicked, this decoding of the token will be shown:

Use EchoSign Api in C#

I need to get the list of document and echosign it in c#. Also I need the Abobe Echosign oauth api to validate the username and password and get the access token key.
Please help!!
There is a another question related to using Adobe Sign api in c#. This might be helpful for you.
Adobe Sign (echo sign) API sending document using C#

To integrate with Silverpop

Can anyone guide how to integrate with Silverpop, using OAuth(tokens)?
I referred this link
connecting to web api using c#
and I was able to get access token. After this I don't know how to proceed.
Thanks.
Take a look at my github repo:
https://github.com/marcelluseasley/IBM-Marketing-Cloud-XML-API-Wrapper
It isn't finished, but I started working on an XML API wrapper for the Silverpop API. First of all, if you are trying to integrate with the API, you should be able to contact client support and get a copy of the API PDF.
In any case, you should have a client id, client secret, and refresh token. You will need these three things along with a header value of "refresh_token" for the "grant_type" header key.
So you will first sent a post to https://api(pod number).silverpop.com/oauth/token . This will return an access token in a json dictionary ("access_token").
Any subsequent calls made to the API endpoint (https://api(pod number).silverpop.com/XMLAPI will require that you pass this access token in the header section of your request:
"Authorization:" would be the header key and
"Bearer: (access token)" would be the header value
Looking at my code will make it clearer if you are using Python. Your best bet is to get a copy of the API documentation. You have to be a Silverpop client to get a copy though.
Good luck.
Check the follwing:
http://www.codeproject.com/Articles/758362/SilverPop-Integration
Follow the step by step guide.

How to get Google cookies having the user and the password?

The tool I'm developing would do a thing similar to when you join Facebook and they ask your GMail username and password and with it they can grab all your contacts.
But my tool doesn't use a browser, therefore it is difficult to get the proper headers. I assume that the Google application (Orkut) checks only my Cookies and Identity(ip, machine name, user-agent) as authentication method. In this case all I need is to get the proper cookies.
I tried to call https://www.google.com/accounts/ServiceLoginAuth?service=orkut with the parameters Passwd=realPasswordHere&Email=mymail#gmail.com . But the response was a similar HTML with Set-Cookie: GALX=A9iBuq7y5xU;Path=/accounts;Secure
None of these cookies are the real thing. Have you tried it yourself? Do you know how to do it? Have you ever seen an open source project that does it?
Consider using OAuth -- the URL I just gave details how to use OAuth to authorize the OpenSocial REST interface on Orkut, and this one has detailed specs on the RPC interface to OpenSocial, if that's what you prefer (the authorization part is basically the same, anyway).
If you are just looking for the contacts check out the provided API:
http://code.google.com/apis/contacts/
other google APIs
http://code.google.com/apis/gdata/
If you need source code to view how to do this you can check out the following project.
http://sourceforge.net/projects/gccontactman/
hope that helps, and good luck!
Perhaps you could check the source code of a Google tool that does this:
http://mail.google.com/mail/help/email_uploader.html