def get_contact(self, msisdn):
        """
        Returns the WhatsApp ID for the given MSISDN
        """
        response = self.session.post(
            urllib_parse.urljoin(self.api_url, "/v1/contacts"),
            json={"blocking": "wait", "contacts": [msisdn]},
        )
        response.raise_for_status()
        whatsapp_id = response.json()["contacts"][0].get("wa_id")
        if not whatsapp_id:
            self.fire_failed_contact_lookup(msisdn)
        return whatsapp_id
def get_contact ( self , msisdn ) : response = self . session . post ( urllib_parse . urljoin ( self . api_url , "/v1/contacts" ) , json = { "blocking" : "wait" , "contacts" : [ msisdn ] } , ) response . raise_for_status ( ) whatsapp_id = response . json ( ) [ "contacts" ] [ 0 ] . get ( "wa_id" ) if not whatsapp_id : self . fire_failed_contact_lookup ( msisdn ) return whatsapp_id
Returns the WhatsApp ID for the given MSISDN