If you are using our Double Opt-In functionality, you might require to check programmatically, if a user has verified their email address or not.
For this purpose, you are able to either use the API call /email/confirmation/check on the backend or use it on the frontend like this:
tp.api.callApi("/email/confirmation/check", {}, function(response) {console.log(response)});
More information about this Piano API endpoint is available here.
In addition, the information if a user's email address has been verified is also available in the tp.pianoId.getUser function in the parameter confirmed. Please see a sample response of a confirmed user below:
aud: "gBn9YkcGwE"
confirmed: true
email: "sample@email.com"
email_confirmation_required: true
exp: 1608712250
family_name: "Doe"
firstName: "John"
given_name: "John"
iat: 1608539450
iss: "https://id.piano.io"
jti: "TIRsN8Puccqlokze"
lastName: "Doe"
login_timestamp: "1608539450196"
sub: "PNIQKMhLmqlokze"
uid: "PNIQKMhLmqlokze"
valid: true