メニュー

Expand
ページを評価:

Notifications (通知) リソース

概要

This resource is meant to be used when implementing Verify Push. It lets developers request that Verify Push retry sending a push notification for the same Challenge. Previously, there was a 1:1 mapping between a Challenge and push notification, so developers had to create a new, duplicate Challenge to resend a push notification for the same verification action (e.g. two-factor auth for a user login). They then had to deduplicate the Challenges on the client side. This implementation complexity is removed with this resource.

The Notifications resource is currently in the Pilot maturity stage, please check with Twilio before using it in production.

APNs/FCM behavior: Please be aware that APNs and FCM already have built-in queueing and retry logic for the scenario where the device was offline when the push notification was requested. When the device becomes online again, all non-expired push notifications (based on the push’s time-to-live / ttl) will be sent again. We recommend that developers limit the number of retries a user can request, so that the user doesn’t accidentally “over-request” and end up getting a flood of push notifications. We have also made ttl a configurable resource parameter, so developers can expire past push notifications more quickly if this becomes a problem.

Challenge expiration: Please note that the Challenge itself can still expire. Requesting a retry push notification on an expired Challenge will result in an error response, and developers will need to create a new Challenge. This won’t create a dedup problem for the client-side though, because the client can just request pending, not expired, Challenges.

Notification properties

Resource Properties in REST API format
sid
sid<NT> Not PII

A 34 character string that uniquely identifies this Notification.

account_sid
sid<AC> Not PII

The unique SID identifier of the Account.

service_sid
sid<VA> Not PII

The unique SID identifier of the Service.

entity_sid
sid<YE> Not PII

The unique SID identifier of the Entity.

identity
文字列 PII MTL: 30 DAYS

Customer unique identity for the Entity owner of the Challenge. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

challenge_sid
sid<YC> Not PII

The unique SID identifier of the Challenge.

priority
文字列 Not PII

The priority of the notification. For push Challenges it's always high which sends the notification immediately, and can wake up a sleeping device.

ttl
integer Not PII

How long, in seconds, the notification is valid. Max: 5 minutes

date_created
date_time<iso8601> Not PII

The date that this Notification was created, given in ISO 8601 format.

Resend Push Notification

post
https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{ChallengeSid}/Notifications

Only 3 Push Notifications can be created per Challenge

パラメーター
Parameters in REST API format
service_sid
Path
post sid<VA> Not PII

The unique SID identifier of the Service.

identity
Path
post 文字列 PII MTL: 30 DAYS

Customer unique identity for the Entity owner of the Challenge. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

challenge_sid
Path
post sid<YC> Not PII

The unique SID identifier of the Challenge.

ttl
オプション
post integer Not PII

How long, in seconds, the notification is valid. Can be an integer between 0 and 300. Default is 300. Delivery is attempted until the TTL elapses, even if the device is offline. 0 means that the notification delivery is attempted immediately, only once, and is not stored for future delivery.

例 1
        
        
        
        ページを評価:

        ヘルプが必要ですか?

        We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.

              
              
              

              フィードバックくださりありがとうございます!

              We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              Refer us and get $10 in 3 simple steps!

              ステップ1

              Get link

              Get a free personal referral link here

              ステップ2:

              Give $10

              Your user signs up and upgrade using link

              ステップ3

              Get $10

              1,250 free SMSes
              OR 1,000 free voice mins
              OR 12,000 chats
              OR more