How to call docusign apis for sending envelopes in node.js? - node.js

I have a standard DocuSign account and I want to add an integration key but I am not able to add that key as there is no option to in my standard account to add the key. Further, I want to hit DocuSign API either through nodejs-sdk or postman to create and send an envelope with the use of the template. So, for this what should I do? Can anybody help, please?

Sounds like you're just getting started with the DocuSign eSignature API. Welcome! We have a variety of resources that you will find helpful.
I would start here on the DocuSign Developer Center.
To begin experimenting with our API, you'll first need to create a demo sandbox account. Within this account, you can provision your own integrator keys. Later down the road, you will follow our "Go-Live" process to transition your integration to our paid, production environment.
Once you have your account created, I would suggest you check out this quickstart code example.
That should get you started!

You should create a new developer/sandbox account to create an integration key. You cannot do that in production.
For node.JS we have a few different resources you can use, the most complete one is our code example "launcher" that can be used as a full app to try the code. We also have a quickstart that you an use without configuring the API authentication part.

Related

Which is the correct OAuth Flow for our use case?

First of all, I apologize for eventual noob questions, we are very new to the DocuSign API and are currently trying to wrap our heads around which is the most correct way of accessing the API.
I will start with an overview of our use case. We recently purchased a DocuSign prod. Account with an Organization enabled.
We have a Partner which uses a CMS Tooling which integrates with said DocuSign Account. This Tool allows for the Backoffice to create envelopes with documents inside and a url which leads to the signin ceremony through the Templates that we create inside the DocuSign Account. This url is afterwards send to the customer for them to sign the documents in the envelope. This Part is working and is currently being used.
Now what we want to achieve on our side, we have a nextJS web-app which allows the same customers (Which are the receivers of the created envelopes in the step above, same e-mail in both steps) to sign-in our web-app. We want to show the customer in a dashboard, if there are envelopes for him open that he can sign and if this is the case we want to show him the url which leads to the signin ceremony.
We were able to see that as soon as an envelope for a certain User is created through the CMS Tooling, we can see that envelope in our DocuSign Prod Account.
Now our thought process was, to show our customer his open envelopes, we just fetch all open envelopes in our DocuSign Account which match the customers E-Mail.
Is there anything wrong with this process or are we overlooking something?
And if it is okay to proceed this way which of the OAuth Flows is the correct one to use for this case?
From my understanding, the JWT Flow seems like the most reasonable one? Since the Customers that need to sign the documents, will not have any DocuSign accounts.
What have you tried to solve the issue?
We tried using the direct API Access, which worked when set up correctly but since we didn't have a OAuth Flow in place the Access token is only valid for restricted amount of time obviously and has to be refreshed. Hence we have to think first about how to grant access correctly
I would love to hear, what the right approach would be to achieve our desired result.
Once again Apologies for this kind of question, just trying to have a better understanding before we start building :)
Best regards!
According to the use case you mentioned using JWT Grant is fine as users of your integration will use a single system account to log in, you should use JWT Grant.
I would recommend going with the below link to know more regards different use cases and check the knowledge
https://developers.docusign.com/platform/auth/choose/
https://developers.docusign.com/platform/auth/oauth2-requirements-migration/

Automating the process of creating and configuring a new DocuSign developer account via API

Right now I'm exploring potential options for automating the process of creating and configuring new DocuSign developer accounts via API calls, as this would allow my team to greatly reduce the work needed to setup and configure these accounts manually. I can't find any information in the current DocuSign API documentation that would allow for this, and the only question I could find online was Is it possible to create a DocuSign developer account via REST calls? from 2019.
Is it possible to create new developer accounts via an API? The POST requests utilized by the UI don't look to be designed in a way that would easily allow for this.
There's an endpoint in the eSignature API called Accounts:Create that enables creating new accounts.
However, it's important to note this:
This method is restricted to partner integrations. You must work with DocuSign Professional Services or DocuSign Business Development, who will provide you with the Distributor Code and Distributor Password that you need to include in the request body.

I want to build a docusign api to allow my cutomers who have docusign account to manage them through our website to interact

I have a small business where 5 of my customers use docusign. They want to be able to manage their docusign accounts through our website. I have created a docusign api on my end which I tested using my own developer account using my integration and secret keys which I store on my server in the db. I now want to allow my 5 customers to use this api to control their own docusing accounts. Do they all need to have a developer account and make it go live? I'm sure there is a better way and I cant make sense of it.
Do I need to push my app to live as well and purchase an API plan from docusign?
Please help it s hard to find any resource about this.
Do they all need to have a developer account and make it go live?
No, they don't need to. They have a production account and once your app goes live they can use your app with their account. If you want them to test your app in the developer environment first - then yes, they can get a developer account (which is free) to do some testing, but not required at all.
Do I need to push my app to live as well and purchase an API plan from
docusign?
Yes, you need to make your app live so that it can be used by paying customers in production. You would need your own production account to do that. If you are an ISV/Partner - you can get a free one, otherwise you will have to pay for your plan.

is there rest APIs to create an agreement using a predefined template in Docusign CLM?

I want to integrate a web portal with DocuSign CLM. I have few form fields and a template in DocuSign CLM.
I want to perform the below tasks from the portal:
Mapping fields value sent from portal to form fields in the template
Generate an agreement using the template
View the agreement
Send it for e-signature
I want to know all CLM rest APIs that will allow me to use this programmatically from the frontend by passing values from our portal to CLM.
I went through the below CLM rest API docs but it didn't help much.
(https://developers.docusign.com/docs/clm-api/)
Any help would be appreciated.
according to my teammates at DocuSign, you have to process all of your XML before you send it so that it is compatible with the merge template you’re sending it to.
This documentation may be helpful to look further into your question: https://developers.docusign.com/docs/clm-api/reference/tasks/documentxmlmergetasks/
this is not a question but rather a demand and is not in the spirit of the stackoverflow. I suggest that you either start doing research to better understand the space that you are working in or find a partner or engage with Professional services
Here are some links to get you started.
https://developers.docusign.com/docs/clm-api/reference/tasks/documentxmlmergetasks/
https://developers.docusign.com/docs/esign-rest-api/how-to/setup-authentication
https://developers.docusign.com/docs/clm-api/clm101/auth

How to access a gmail account I own using Gmail API?

I want to run a node script as a cronjob which uses Gmail's API to poll a gmail account I own.
I am following these quickstart instructions:
I'm stuck on the first step. When requesting credentials for a cron script it tells me that "User data cannot be accessed from a platform without a UI because it requires user interaction for sign-in":
The docs are confusing in general, and mention "service accounts," "OAuth," and other things -- I cannot tell which apply to my use-case and which don't. I've used many SaaS APIs, and the typical workflow is to login to your account, get an API key and secret, and use those in your script to access the API. It seems this is not the paradigm used by the Gmail API, so I'd appreciate any guidance or links to clearer instructions.
I also find that the documentation can be confusing at times, but what you want to to is actually pretty straight forward once you get it:
Register your App at Google, and say what APIs you want your App to have access to (only the Gmail API in this case). This will give you two strings, a client_id and a client_secret (which is the content of the client_secrets.json-file above).
Since you are just going to write a script for your own account only, you don't need a http-server. The Oauth Playground will suffice. Press the Settings Cog on the top right and use your own OAuth credentials.
Select the Gmail API in the list of APIs and follow the outlined steps.
Now you have an access_token and a refresh_token you can use to keep your script going indefinitely!
To fully understand the use of Gmail API, going through Gmail API Overview really will make a difference.
And you can also use these documentations to start building a Gmail app:
The client libraries are available for download in several languages and simplify making API requests.
The developer guide topics help you better understand how to implement particular use cases.
The API reference gives you details on every resource and method in the Gmail API.
I hope these help.

Resources