You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Jalapina's avatar
Jalapina
Helpful | Level 5
2 years ago

Get Embedded Sign URL is asking for client id

when i run this code on my react app it gives me an error saying im missing the client ID parameters but in the documentation it dosent mention that , how am i suppose to make this call? 

 

Your request seems to have been malformed and returned the following error:

→ Missing parameter: client_id



async function fetchSignUrl() {
try {
const response = await fetch(`https://api.hellosign.com/v3/embedded/sign_url/${signature_id}`, {
method: 'GET',
headers: {
'Authorization': `Basic ${btoa(API_KEY + ':')}`
}
});

if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}

const data = await response.json();
if (data && data.embedded && data.embedded.sign_url) {
setSignUrl(data.embedded.sign_url);
}
} catch (error) {
console.error("There was a problem fetching the sign URL:", error);
}
}

 

  • Hi!

     

    Based on the error message that you are encountering, it looks like you are not passing the client_id parameter while opening the signature request on an iframe.

    Dropbox Sign provides a library that takes care of building and displaying the iframe on your platform. If you are using a modern module bundler with npm, simply install hellosign-embedded on your application.

     

    Once your application has the hellosign-embedded library installed, you would use the following code snippet below to open the iframe:

    const client = new HelloSign();
    
    // Opening the iframe in Test Mode
    client.open( "YOUR_SIGN_URL", {
    testMode: true,
    clientId: 'YOUR_CLIENT_ID',
    skipDomainVerification: true,
    });

     

    Feel free to use our Embedded Testing Tool during testing as well.

     

    Hope this helps!

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Engineer rankDropbox Engineer

    Hi!

     

    Based on the error message that you are encountering, it looks like you are not passing the client_id parameter while opening the signature request on an iframe.

    Dropbox Sign provides a library that takes care of building and displaying the iframe on your platform. If you are using a modern module bundler with npm, simply install hellosign-embedded on your application.

     

    Once your application has the hellosign-embedded library installed, you would use the following code snippet below to open the iframe:

    const client = new HelloSign();
    
    // Opening the iframe in Test Mode
    client.open( "YOUR_SIGN_URL", {
    testMode: true,
    clientId: 'YOUR_CLIENT_ID',
    skipDomainVerification: true,
    });

     

    Feel free to use our Embedded Testing Tool during testing as well.

     

    Hope this helps!

  • marshray's avatar
    marshray
    New member | Level 2

    The error you're encountering, "Missing parameter: client_id," is specific to the HelloSign API. In the HelloSign API, the client_id is a required parameter for authentication and authorization purposes. It's typically used to identify your application when making API requests.

    To resolve this issue, you need to include the client_id parameter in your API request headers. Here's how you can modify your fetchSignUrl function to include the client_id: 

    async function fetchSignUrl() {
    try {
    const client_id = 'YOUR_CLIENT_ID'; // Replace with your actual HelloSign client ID
    const response = await fetch(`https://api.hellosign.com/v3/embedded/sign_url/${signature_id}`, {
    method: 'GET',
    headers: {
    'Authorization': `Basic ${btoa(API_KEY + ':')}`,
    'HelloSign-ClientId': client_id, // Include the client_id in the headers
    }
    });

    if (!response.ok) {
    throw new Error(`HTTP error! Status: ${response.status}`);
    }

    const data = await response.json();
    if (data && data.embedded && data.embedded.sign_url) {
    setSignUrl(data.embedded.sign_url);
    }
    } catch (error) {
    console.error("There was a problem fetching the sign URL:", error);
    }
    }

    Make sure to replace 'YOUR_CLIENT_ID' with your actual HelloSign client ID, which you should have obtained when setting up your HelloSign integration. Including the client_id in the headers should resolve the "Missing parameter: client_id" error you're encountering.