One-Time Code

To embed the Onboarding Flow and securely enable your customers to share their data, you must generate a One-Time Code (OTC). You generate this secure, single-use code when inviting your customer to the Onboarding Flow. Once an OTC is used, it becomes invalid.

Generating an OTC

To generate an OTC, simply call the Consent API. The response will contain the One-Time Code.

Using the OTC in the URL

You'll need to include the OTC in the Onboarding Flow URL. Here's how it looks:

https://onboarding.zwapgrid.com/consent/<consent-id>/?otc=<one-time-code>

Remember to replace <consent-id> and <one-time-code> with your actual values.

circle-info

URL Encoding

Important: The One-Time Code is not URL-encoded. You must URL-encode it before including it in the Onboarding Flow URL.

Validity

A One-Time Code is valid for one hour from its creation. It is not advisable to share the One-Time Code - it should be used either by embedding the Onboarding Flow inside your platform, or by redirecting to the Onboarding Flow from your platform.

It is important to note that a One-Time Code is invalidated once it is consumed. This means that if you share a link containing the One-Time Code via a messaging application (e.g. Slack) or similar medium where a preview of the link is shown, this will consume the One-Time Code and it will no longer work.

circle-exclamation

Last updated

Was this helpful?