Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit c528306

Browse files
Rephrasing
1 parent 4551118 commit c528306

File tree

1 file changed

+13
-11
lines changed
  • content/en/user-guide/aws/pinpoint

1 file changed

+13
-11
lines changed

content/en/user-guide/aws/pinpoint/index.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@ The following output would be retrieved:
9898

9999
The operations [`SentOTPMessage`](https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-otp.html#SendOTPMessage) and [`VerifyOTPMessage`](https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-verify-otp.html#VerifyOTPMessage) are used for one-time password (OTP) verification.
100100

101-
On production AWS, `SendOTPMessage` sends an actual SMS text message with the OTP code.
101+
On production AWS, `SendOTPMessage` sends an SMS text message with the OTP code.
102102
The OTP can then be verified against the reference ID using `VerifyOTPMessage`
103103

104-
LocalStack however can not send an actual SMS text message with the OTP code.
105-
There are alternative ways to retrieve the true OTP code as illustrated below:
104+
LocalStack however can not send real SMS text messages.
105+
Instead it provides alternative ways to retrieve the actual OTP code as illustrated below.
106+
107+
Begin by making a OTP request:
106108

107109
{{< command >}}
108110
$ awslocal pinpoint send-otp-message \
@@ -111,7 +113,7 @@ $ awslocal pinpoint send-otp-message \
111113
"BrandName": "LocalStack Community",
112114
"Channel": "SMS",
113115
"DestinationIdentity": "+1224364860",
114-
"ReferenceId": "meetup2024",
116+
"ReferenceId": "liftoffcampaign",
115117
"OriginationIdentity": "+1123581321",
116118
"CodeLength": 6,
117119
"AllowedAttempts": 3,
@@ -129,14 +131,14 @@ $ awslocal pinpoint send-otp-message \
129131
You can use the debug endpoint `/_aws/pinpoint/<application_id>/<reference_id>` to retrieve the OTP message details:
130132

131133
{{< command >}}
132-
$ curl http://localhost:4566/_aws/pinpoint/fff5a801e01643c18a13a763e22a8fbf/meetup2024 | jq .
134+
$ curl http://localhost:4566/_aws/pinpoint/fff5a801e01643c18a13a763e22a8fbf/liftoffcampaign | jq .
133135
{
134136
"AllowedAttempts": 3,
135137
"BrandName": "LocalStack Community",
136138
"CodeLength": 6,
137139
"DestinationIdentity": "+1224364860",
138140
"OriginationIdentity": "+1123581321",
139-
"ReferenceId": "meetup2024",
141+
"ReferenceId": "liftoffcampaign",
140142
"ValidityPeriod": 2,
141143
"Attempts": 0,
142144
"ApplicationId": "fff5a801e01643c18a13a763e22a8fbf",
@@ -145,19 +147,19 @@ $ curl http://localhost:4566/_aws/pinpoint/fff5a801e01643c18a13a763e22a8fbf/meet
145147
}
146148
{{< /command >}}
147149

148-
Futhermore, the OTP code is printed as an `INFO` level log message:
150+
The OTP code is also printed in an `INFO` level message in the LocalStack log output:
149151

150152
```text
151-
2024-10-17T11:08:24.044 INFO : OTP for application ID fff5a801e01643c18a13a763e22a8fbf reference ID meetup2024: 655745
153+
2024-10-17T11:08:24.044 INFO : OTP for application ID fff5a801e01643c18a13a763e22a8fbf reference ID liftoffcampaign: 655745
152154
```
153155

154-
It can then verified using:
156+
Finally, the OTP code can be verified using:
155157

156158
{{< command >}}
157159
$ awslocal pinpoint verify-otp-message \
158160
--application-id fff5a801e01643c18a13a763e22a8fbf \
159161
--verify-otp-message-request-parameters '{
160-
"ReferenceId": "meetup2024",
162+
"ReferenceId": "liftoffcampaign",
161163
"DestinationIdentity": "+1224364860",
162164
"Otp": "655745"
163165
}'
@@ -170,5 +172,5 @@ $ awslocal pinpoint verify-otp-message \
170172
</disable-copy>
171173
{{< /command >}}
172174

173-
When validating OTP codes, LocalStack accounts for the number of allowed attempts and the validity period.
175+
When validating OTP codes, LocalStack checks for the number of allowed attempts and the validity period.
174176
Unlike AWS, there is no lower limit for validity period.

0 commit comments

Comments
 (0)