Here are the essential steps to integrating with Vouchsafe.

<aside> đź“Ś Tip: View the Vouchsafe live API endpoints at: app.vouchsafe.id/docs/api/v1 and sandbox endpoints at app.vouchsafe.id/docs/api/v1/sandbox

</aside>

<aside> ✍️ Note: Here’s a minimal Node.js code sample showing how to interact with the API.

</aside>

https://youtu.be/aryCZ16Cg_I

1. Get an access token

Get your Client ID and Production secret from the API integrations page of the dashboard.

Use those secrets to create an access token:

curl -X POST "<https://app.vouchsafe.id/api/v2/authenticate>" \\
  -H  "Content-Type: application/json" \\
  -d "{\\"client_id\\":\\"string\\", \\"client_secret\\":\\"string\\"}"

Or with Node.js:

fetch("<https://app.vouchsafe.id/api/v2/authenticate>", {
	method: "POST",
	headers: {
		"Content-Type": "application/json"
	},
	body: {
		client_id: "string",
		client_secret: "string"
	},
})

You’ll get a response like:

{  
  "access": "ACCESS_TOKEN",
  "expiresAt": "string", // expiration as an ISO8601 timestamp
}

An access token lasts for up to one day. We don’t yet support refresh tokens.

Once your access token expires, request a new one the same way.

2. Request a verification

Use your access token to request verification, passing in:

curl -X POST "<https://app.vouchsafe.id/api/v2/verifications>" \\
  -H  "accept: application/json" \\
  -H  "Authorization: Bearer ACCESS_TOKEN" \\
  -d "{\\"email\\":\\"string\\", \\"redirectUrl\\":\\"string\\"}"

You’ll get a response like: