Our Community is in read-only mode until April 8th, learn more here. You can still search existing threads or get help via Dropbox Support, the Dropbox Help Center, or Learn.
Forum Discussion
rostyslavpopov
1 year agoExplorer | Level 4
Missing parameter: client_id for lwc
Im working on a lwc where id like to embed a signing process in iframe, I was able to successfully retrieve sign URL, but when I try to use it on iframe I got following error, at which step do I need...
eappsiadvancenow123
1 year agoNew member | Level 1
rostyslavpopovThank you so much for your help here! I was able to get the sign url successfully.
Probably one last question, how are you opening embedded window on your site? When I'm trying to open it in incognito window by appending client_id in url, it gives me this error(attached screenshot).
I have provided "my.salesforce-sites.com" under Domain in my App.
Your help in this is very much appreciated!
rostyslavpopov
1 year agoExplorer | Level 4
can you provide more details on what are you trying to achieve please?
- eappsiadvancenow1231 year agoNew member | Level 1
I have created a site in salesforce and i want to open embedded signature window on my site. I tried to import JS file available on github in my LWC component but that doesn't work so I'm trying to use iframe and under the iframe, my URL is (sign URL + client_id + skip_domain_verification=1) but its not working.
It gives me invalid URL when i open in iframe but same URL works in incognito window or any other window.
Your help is very much appreciated!
- rostyslavpopov1 year agoExplorer | Level 4
okay so for this you need to do the js lib part.
Go to https://www.jsdelivr.com/package/npm/hellosign-embedded , there will be an URL in source, go to that URL, copy its content and create a JS file. Upload this file(one file only, no folders) as public Static resource with a name DropboxSign. Then import and load it in your JS file:import dropboxSign from '@salesforce/resourceUrl/DropboxSign'; loadScript(this, dropboxSign) .then(() => { // console.log('dropbox sign loaded'); }) .catch(error => { console.error('Error loading dropbox sign:' , error) })Loading can be put into connected callback. Then when its time for a sign you need to do a following:
const client = new HelloSign({ clientId: this.clientId, }); client.open(result, { skipDomainVerification: true })- eappsiadvancenow1231 year agoNew member | Level 1
Thank you very much for your swift responses!
I'm not sure what I'm doing wrong in the above mentioned steps but the embedded window is not opening. Here is the steps i followed:
- I went to this site(attached screenshot) and copied the content and saved it as JS file.
- Uploaded this file as Public static resource(the only file)
- Imported this file into LWC by
import HelloSign from '@salesforce/resourceUrl/DropBoxSign';
- Loaded this static resource in connected callback
Promise.all([
loadScript(this, HelloSign)
]).then(() => {
console.log('JS and Style Resources loaded successfully');
}).catch((error)=>{
console.log('Error occurred while loading JS resources'+ error);
I have a button "E-sign" on the site, when clicking on that button, I'm calling a function and this is function body:
createEmbeddedSignatureRequest is apex method which will return sign url.createEmbeddedSignatureRequest({leadId: this.leadId}).then(result=>{
this.signUrl = result;
console.log('Success createEmbeddedSignatureRequest:'+ this.signUrl);
}).catch(error=>{
console.log('Error occurred in createEmbeddedSignature'+ JSON.stringify(error));
})
setTimeout(()=>{
try{
const client = new HelloSign({ clientId: 'myClientId' });
client.open(this.signUrl, { skipDomainVerification: true });
}
catch(e){
console.log('Error occurred while opening embedded:'+ JSON.stringify(e));
}
},5000);
rostyslavpopovDo you see any missing item here? Thank you soooooooo much for helping me in this.
About Dropbox Sign API
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!