Video at 1:00:00 time, line 100 have resposne spell mistake but project is running,and even @55:49 line 33 is missed with reference variable as results.envelopeid and need to pass the clientuserid in function parameter
Thanks for pointing it out. I don't understand your point about clientUserId. I am passing it in both the template and recipient view request github.com/titus58/youtube-tutorials/blob/main/docusign/index.js#L56
Parabéns pelo video, muito bom, bem explicado os passos que temos que fazer e como fazer, principalmente na parte da autenticação, abraços e continue com os videos, thanks!!!!
Hey, friend I followed the steps and it worked! But how can I leave the demo version? Example of using it normally in everyday life even without it appearing to be a demo? Do you have to make 20 calls successfully? Could you help? I'm Brazilian and I use Google Translate, sorry for any mistakes
Hi, the code worked perfectly. But I tried to migrate it to NextJs, inside the pages/api that runs everything in NodeJs. He can't read private.key for nothing...I've tried several path solutions, direct import, etc...could you help me? I saw a solution that the person creates a server.js inside the root, but it was for another question and in an old version of NExtJS. I didn't feel comfortable to test...please.
You have to change the way you construct the path for private.key. Take a look at the Gist below. Notice how instead of __dirname I'm using process.cwd(). Also the console.log line above will show you where the private.key file should be placed. gist.github.com/titus58/cc1c264c820cbceac25b474c42aba7e5
Hi, maybe this helps: const privateKeyFilename = join(process.cwd(), "config", "private.key"); I put the config folder in the root folder. If you use typescript, you also gonna need this line: const privateKey = fs.readFileSync(privateKeyFilename);
Hi. The setup in the video is with embeddable signing. You need to redirect to the view url and the customer can sign there. After they sign, they receive a copy by email
at 21:00 I'm looking for my access token. here's what i get after setting up the private.key: Error: secretOrPrivateKey must be an asymmetric key when using RS256 i got rid of all the line breaks in the private.key file
I didn't get rid of the newlines, just copied and pasted as it was from the application page. Also, make sure you didn't accidentally used the public key instead of the private. You can try creating a new RSA key as well on the same app, you can have multiple keys. Also make sure you didn't miss one argument in the requestJWTUserToken call or reordered arguments.
Thanks for the video. It helps. I am facing one problem while creating envelope. let results = await envelopesApi.createEnvelope( process.env.DOCUSIGN_ACCOUNT_ID, { envelopeDefinition: envelope, } ); results object is always `exports {}` from the response. Can you please help me with this?
If that when you console.log the response. I think that's fine, it just doesn't have a renderer to string. You can try to print some fields from inside the object
let dsApiClient = new docusign.ApiClient(); dsApiClient.setBasePath(process.env.BASE_PATH); dsApiClient.addDefaultHeader('Authorization', 'Bearer ' + req.session.access_token); return new docusign.EnvelopesApi(dsApiClient);
HI, i am getting below error while running the application UnhandledPromiseRejectionWarning: TypeError: Right-hand side of 'instanceof' is not an object at Object.module.exports [as sign] (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/jsonwebtoken/sign.js:108:58) at generateAndSignJWTAssertion (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/docusign-esign/src/ApiClient.js:65:16) at exports.requestJWTUserToken (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/docusign-esign/src/ApiClient.js:917:19) at checkToken (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/index.js:89:41) at app.get (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/index.js:103:10) at Layer.handle [as handle_request] (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/layer.js:95:5) at next (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/route.js:144:13) at Route.dispatch (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/route.js:114:3) at Layer.handle [as handle_request] (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/layer.js:95:5) at /Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/index.js:284:15 (node:63064) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:63064) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@@vladsavecoding4111 I just downloaded your code from git and added my userid credentials from docusign developer portal. It's all your code only. no changes
This is the error i am getting now.. The above error is because of node version. I upgraded it to latest node version, it started working. Now when i click submit button, it shows the below error, TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined at Object.openSync (node:fs:582:10) at Object.readFileSync (node:fs:458:35) at makeEnvelope (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/index.js:81:21) at /Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/index.js:22:19 at processTicksAndRejections (node:internal/process/task_queues:96:5) { code: 'ERR_INVALID_ARG_TYPE'
Some things to check: did you do "npm install" before running? Otherwise check out this source, see if you're missing something github.com/titus58/youtube-tutorials/blob/main/docusign/index.js#L20
Hey, friend I followed the steps and it worked! But how can I leave the demo version? Example of using it normally in everyday life even without it appearing to be a demo? Do you have to make 20 calls successfully? Could you help? I'm Brazilian and I use Google Translate, sorry for any mistakes
Yes, you need to follow the steps in their doc. Also, you need to change the BASE_PATH in env to the production one. developers.docusign.com/platform/go-live/
I don't think DocuSign will work for your use case. Try looking for something "pdf digital signature library". I never had your problem so I can't recommend one library or another. Sorry
On UA-cam only one perfect video about DocuSign Authentication 🔥Keep it up❤️
Thanks 🙏
Thanks Man. Keep working like that.
Thanks for posting. Explained everything wonderfully
Good video! Congratulations! It helped a lot to understand, especially the authentication part. Thanks!
Great video, Vlad.
Thanks
Video at 1:00:00 time, line 100 have resposne spell mistake but project is running,and even @55:49 line 33 is missed with reference variable as results.envelopeid and need to pass the clientuserid in function parameter
Thanks for pointing it out. I don't understand your point about clientUserId. I am passing it in both the template and recipient view request github.com/titus58/youtube-tutorials/blob/main/docusign/index.js#L56
Keep up the great work!
Parabéns pelo video, muito bom, bem explicado os passos que temos que fazer e como fazer, principalmente na parte da autenticação, abraços e continue com os videos, thanks!!!!
how to send what you did after clicking form button a link to this for requested signing users to complete?
thank you so much for making this video it's really help me alot
What plan are you using with Docusign to do this? Is it the Advanced Developer API?
Basic eSignature trial plan
how to customize the ui? like If I dont want the docusign default branding to come in while loading the signing page
Good stuff, thanks!
Hey, friend
I followed the steps and it worked!
But how can I leave the demo version?
Example of using it normally in everyday life even without it appearing to be a demo?
Do you have to make 20 calls successfully?
Could you help?
I'm Brazilian and I use Google Translate, sorry for any mistakes
Hi, the code worked perfectly. But I tried to migrate it to NextJs, inside the pages/api that runs everything in NodeJs. He can't read private.key for nothing...I've tried several path solutions, direct import, etc...could you help me? I saw a solution that the person creates a server.js inside the root, but it was for another question and in an old version of NExtJS. I didn't feel comfortable to test...please.
You have to change the way you construct the path for private.key. Take a look at the Gist below. Notice how instead of __dirname I'm using process.cwd(). Also the console.log line above will show you where the private.key file should be placed.
gist.github.com/titus58/cc1c264c820cbceac25b474c42aba7e5
Hi, maybe this helps:
const privateKeyFilename = join(process.cwd(), "config", "private.key");
I put the config folder in the root folder. If you use typescript, you also gonna need this line:
const privateKey = fs.readFileSync(privateKeyFilename);
Thanks a lot.❤❤❤
Good job!
View URL is returning and working but email is not sending to customer for singature, can you please help?
Hi. The setup in the video is with embeddable signing. You need to redirect to the view url and the customer can sign there. After they sign, they receive a copy by email
Hi! Im having this error when requesting for jwt token, Error: Invalid expires in param detected. this is my requrest
let dsApiClient = new docusign.ApiClient();
dsApiClient.setBasePath(process.env.NEXT_PUBLIC_DOCUSIGN_BASE_PATH);
const results = await dsApiClient.requestJWTUserToken(
process.env.NEXT_PUBLIC_DOCUSIGN_INTEGRATION_KEY,
process.env.NEXT_PUBLIC_USERID,
{
scopes: "signature",
},
fs.readFileSync(path.join(__dirname, "../../../../private.key")),
{ expiresIn: 3600 }
);
console.log(`result:` + results.body);
I cannot see your request. Can you send me your code? You can find my email in the channel description. Thanks
Muito obrigado!!
Thanks!😄
at 21:00 I'm looking for my access token. here's what i get after setting up the private.key:
Error: secretOrPrivateKey must be an asymmetric key when using RS256
i got rid of all the
line breaks in the private.key file
I didn't get rid of the newlines, just copied and pasted as it was from the application page. Also, make sure you didn't accidentally used the public key instead of the private. You can try creating a new RSA key as well on the same app, you can have multiple keys. Also make sure you didn't miss one argument in the requestJWTUserToken call or reordered arguments.
Thanks for the video. It helps.
I am facing one problem while creating envelope.
let results = await envelopesApi.createEnvelope(
process.env.DOCUSIGN_ACCOUNT_ID,
{
envelopeDefinition: envelope,
}
);
results object is always `exports {}` from the response. Can you please help me with this?
If that when you console.log the response. I think that's fine, it just doesn't have a renderer to string. You can try to print some fields from inside the object
@@vladsavecoding4111 thanks. I used the code from your github repo. It worked
let dsApiClient = new docusign.ApiClient();
dsApiClient.setBasePath(process.env.BASE_PATH);
dsApiClient.addDefaultHeader('Authorization', 'Bearer ' + req.session.access_token);
return new docusign.EnvelopesApi(dsApiClient);
25:00
28:30
HI, i am getting below error while running the application
UnhandledPromiseRejectionWarning: TypeError: Right-hand side of 'instanceof' is not an object
at Object.module.exports [as sign] (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/jsonwebtoken/sign.js:108:58)
at generateAndSignJWTAssertion (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/docusign-esign/src/ApiClient.js:65:16)
at exports.requestJWTUserToken (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/docusign-esign/src/ApiClient.js:917:19)
at checkToken (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/index.js:89:41)
at app.get (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/index.js:103:10)
at Layer.handle [as handle_request] (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/route.js:144:13)
at Route.dispatch (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/route.js:114:3)
at Layer.handle [as handle_request] (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/layer.js:95:5)
at /Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/node_modules/express/lib/router/index.js:284:15
(node:63064) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:63064) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Can you send me your code? Link to a gist or use my email from the channel description. Thanks
@@vladsavecoding4111 I just downloaded your code from git and added my userid credentials from docusign developer portal. It's all your code only. no changes
This is the error i am getting now.. The above error is because of node version. I upgraded it to latest node version, it started working. Now when i click submit button, it shows the below error,
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
at Object.openSync (node:fs:582:10)
at Object.readFileSync (node:fs:458:35)
at makeEnvelope (/Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/index.js:81:21)
at /Users/rohinikumar.subramani/Documents/GitHub/docusign/docusign/index.js:22:19
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'ERR_INVALID_ARG_TYPE'
@@chinnur7954 Did you also edit the .env file with your account information?
envelopesApi.createEnvelope is not a function
Some things to check: did you do "npm install" before running?
Otherwise check out this source, see if you're missing something
github.com/titus58/youtube-tutorials/blob/main/docusign/index.js#L20
let results = await envelopesApi.createEnvelope(
process.env.ACCOUNT_ID, {envelopeDefinition: envelope});
Hey, friend
I followed the steps and it worked!
But how can I leave the demo version?
Example of using it normally in everyday life even without it appearing to be a demo?
Do you have to make 20 calls successfully?
Could you help?
I'm Brazilian and I use Google Translate, sorry for any mistakes
Yes, you need to follow the steps in their doc. Also, you need to change the BASE_PATH in env to the production one.
developers.docusign.com/platform/go-live/
Hi, I want to save my signed pdf file in local. I don't want to save signed pdf in docusign. how can i do in code level.
I don't think DocuSign will work for your use case. Try looking for something "pdf digital signature library". I never had your problem so I can't recommend one library or another. Sorry