Menu

Expand
Rate this page:

Live Activity

Lookup's Live Activity package allows you to get the connectivity status, porting, and roaming information of a mobile phone number.

To make a Live Activity request, add live_activity to the optional query parameter Fields when making a standard Lookup request.

curl -X GET "https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}?Fields=live_activity" \ -u 
$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Coverage and Limitations: Live Activity is not supported in the US; access to Canada information requires special approval. Otherwise, it is generally supported worldwide, but may not return data from every network. Please conduct tests to confirm coverage for your desired country and network.

Release Stage and Access: Pilot, to request access submit this form. The pilot phase is a tightly controlled release. Participants should prepare for possible service instability, API changes, or defects. It is not recommended that mission-critical applications depend on the availability of the service. However, all data is queried from live and accurate sources. Information is returned as-is from mobile network operators' HLR and thus we do not provide any assurance on its accuracy.

Response properties

The following additional properties are returned for a Live Activity request.

Property Description
Connectivity The connectivity status of the requested mobile phone number. See Connectivity property values for more information.
Ported A boolean value indicating the requested mobile phone number has been ported (true) or has not (false).
PortedCarrier If ported is true, this contains carrier information for the network the number was ported to. See Carrier property values for more information.
Roaming Boolean indicating whether or not the requested mobile phone number is roaming.
RoamingCarrier If roaming is true, this contains carrier information for the network the number is roaming in. See Carrier property values for more information.
OriginalCarrier If ported is false, this contains carrier information for the number's current network. If ported is true, this contains carrier information for the network the number was ported from. See Carrier property values for more information.
ErrorCode The error code, if any, associated with your request.

Connectivity property values

The following are the possible values for the Connectivity property.

Value Description
connected Indicates that the number is valid and the target handset is currently connected to the mobile network and reachable.
absent Indicates that the number is valid but the target handset is currently switched off or out of network reach.
invalid Indicates that the number is not currently assigned to any subscriber on the mobile network or is invalid.
undetermined Indicates that the connectivity status could not be determined and the connectivity status is unknown. This can be caused by lack of connectivity to the target network operator or other exceptions and errors.
Carrier property values

The following values are returned for the PortedCarrier, RoamingCarrier, and OriginalCarrier properties.

Value Description
MobileCountryCode The three digit mobile country code of the carrier, used with the mobile network code to identify a mobile network operator.
MobileNetworkCode The two-three digit mobile network code of the carrier, used with the mobile country code to identify a mobile network operator.
Name The name of the carrier.
Country The carrier's ISO country code. This property is only returned in the RoamingCarrier object.
Loading Code Sample...
        
        
        Mobile phone number with connected status (paid)

        Live Activity Lookup

        Mobile phone number with connected status (paid)
        Loading Code Sample...
              
              
              Connected status with ported response (paid)

              Live Activity Lookup with Ported Response

              Connected status with ported response (paid)
              Loading Code Sample...
                    
                    
                    Connected status with roaming response (paid)

                    Live Activity Lookup with Roaming Response

                    Connected status with roaming response (paid)
                    Rate this page:

                    Need some help?

                    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 Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                    Loading Code Sample...
                          
                          
                          

                          Thank you for your feedback!

                          Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

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

                          Thanks for your feedback!

                          thanks-feedback-gif