When you check user capabilities before hashing messages, you confirm that users can verify messages, but not when verification happens or which messages were successfully verified. With verification receipts, you can identify when users successfully verify messages you hashed and stored with Verified SMS.
Prerequisites
Before you can you receive verification receipts, you need to
- register a webhook where you'll accept the receipts
- store message
hashes with
message.batchCreate
or Verified SMS Sample and SDK version 1.2 or greater
Uniquely identify message verifications
Message hashes stored with
message.batchCreate
or Verified SMS Sample and SDK
version 1.2 or greater accept postbackData
values. postbackData
can be any
base64-encoded value up to 120 bytes, but it's most useful as a unique
identifier for a message hash.
By generating a hash identifier, storing it in your infrastructure (along with
any complementary data), and including that identifier as postbackData
when
you store the hash, you can confirm when a user successfully verifies that
message hash when the hash identifier appears in a verification receipts
postbackData
.
Format
Receipts from users have the following format.
{ "postbackData": "POSTBACK_DATA", "verificationTime": "VERIFICATION_TIME", }
For full formatting and value options, see
VerifiedSmsCallbackData
.