diff --git a/pywa/client.py b/pywa/client.py index e4bdcbc..b6104c0 100644 --- a/pywa/client.py +++ b/pywa/client.py @@ -814,6 +814,24 @@ def send_location( address=address, )["messages"][0]["id"] + def request_location(self, to: str | int, text: str) -> str: + """ + Send a text message with button to request the user's location. + + Args: + to: The phone ID of the WhatsApp user. + text: The text to send with the button. + + Returns: + The message ID of the sent message. + """ + return self.api.send_interactive_message( + to=str(to), + type_="location_request_message", + action={"name": "send_location"}, + body=text, + )["messages"][0]["id"] + def send_contact( self, to: str | int,