API REFERENCE
Consents
Create a Consent
3min
Create a consent by linkToken
POST
Request
Header Parameters
Authorization
String
required
Bearer link token, it returned by the /links
Body Parameters
externalTrackId
String
required
Partners to transfer tracking information, each value must be unique
personalTaxId
String
required
The CPF of the end-user, for Personal Accounts only(If end user is personal required)
businessTaxId
String
optional
The CNPJ of the company, for Business Accounts only(If end user is business required)
institutionCode
String
required
Institution code, it returned by the /institutions
redirectURL
String
required
The URL for redirection upon successful link initialization
phone
String
optional
End user's phone, compliance needs
email
String
optional
End user's email, compliance needs
clientMetadata
Object
optional
Client metadata, recommended
validityPeriod
Number
required
The expiration month of the consent.
If validityPeriod equals 0, the consent will have indefinite validity;
If validityPeriod equals 12, the consent form will only have a validity period of 12 months.
Enum: [0, 12]
The end-user completes authorization and returns to the client's page URL from the LGDP page.
- If authorization succeeds, the Klavi backend returns the redirectURL with the link_id , consent_id,external_info and external_track_id parameters
- If authorization fails, the Klavi backend returns the redirectURL with the link_id, consent_id, external_info , external_track_id ,error and error_description parameters
Name | Type | Required | Description |
---|---|---|---|
consentId | String | Yes | Consent identify maxLength: 36 |
consentRedirectURL | String | Yes | Consent redirect URL, when the front-end of the partner requests this URL, the browser will redirect to the corresponding participant's authorization page, which will pop up the current Link web page. This url can only be accessed once, and it has 60 seconds to be accessed. If the user revokes their consent, or if their validity period has reached 60 minutes, the status will be transferred to REJECTED. Accessing this URL will also return a failure. |
expireAt | String | Yes | Consent(Specifically referring to the consensId) expire time(UTC timezone) |