cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox Sign API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Embedded Sign URL is asking for client id

Get Embedded Sign URL is asking for client id

Jalapina
Helpful | Level 5
Go to solution
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);
}
}

 

1 Accepted Solution

Accepted Solutions

DB-Des
Dropbox Engineer
Go to solution

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!

View solution in original post

2 Replies 2

DB-Des
Dropbox Engineer
Go to solution

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
New member | Level 2
Go to solution

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    marshray New member | Level 2
  • User avatar
    DB-Des Dropbox Engineer
What do Dropbox user levels mean?