This repository was archived by the owner on Aug 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
content/en/user-guide/aws/pinpoint Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -93,3 +93,49 @@ The following output would be retrieved:
9393 }
9494}
9595```
96+
97+ ### OTP verification
98+
99+ The operations ` SentOTPMessage ` and ` VerifyOTPMessage ` are used for one-time password (OTP) verification.
100+
101+ {{< command >}}
102+ $ awslocal pinpoint send-otp-message \
103+ --application-id 4ba98561ebb2cd48c \
104+ --send-otp-message-request-parameters '{
105+ "BrandName": "LocalStack Community",
106+ "Channel": "SMS",
107+ "DestinationIdentity": "+1224364860",
108+ "ReferenceId": "meetup2024",
109+ "OriginationIdentity": "+1123581321",
110+ "CodeLength": 6,
111+ "AllowedAttempts": 3,
112+ "ValidityPeriod": 2
113+ }'
114+ {{< /command >}}
115+
116+ On production, AWS sends an actual SMS text message with the OTP to the destination
117+ The OTP can then be verified against the reference ID using ` VerifyOTPMessage ` :
118+
119+ {{< command >}}
120+ $ awslocal pinpoint verify-otp-message \
121+ --application-id 4ba98561ebb2cd48c \
122+ --verify-otp-message-request-parameters '{
123+ "ReferenceId": "meetup2024",
124+ "DestinationIdentity": "+1224364860",
125+ "Otp": "666666"
126+ }'
127+ {{< /command >}}
128+
129+ LocalStack can not send an actual SMS text with the OTP.
130+ However you can use the debug endpoint ` /_aws/pinpoint/<application_id>/<reference_id> ` to retrieve the OTP message details:
131+
132+ {{< command >}}
133+ $ curl http://127.0.0.1:4566/_aws/pinpoint/4ba98561ebb2cd48c/meetup2024 | jq .Code
134+ "666666"
135+ {{< /command >}}
136+
137+ The OTP is also printed as an ` INFO ` level log message:
138+
139+ ``` text
140+
141+ ```
You can’t perform that action at this time.
0 commit comments