I am trying to automatically send docx documents for signature to Docusign using only google apps scripts.
I went through all the steps to convert the docusign RSA private key from pkcs1 to pkcs8 and then paste the pkcs8 key into the apps script project properties, but i am still running into this error on the code line const signature = Utilities.computeRsaSha256Signature(signatureInput, keyBytes);
I also tried an alternative with uploading the pkcs8 .pem file to drive and using the file ID as one of the project properties, but that didn’t work either, the cleaned key in the debugger is showing up like this (screenshot).
I used the texteditor on macbook (with make plain text formatting utf-8 option) to create the .pem files, the openssl terminal command to convert from pkcs1 to pkcs8 and the cat command to get the pkcs8 key after conversion.

Back to Docusign.com

