def METHOD_NAME(self, token: str, device: "SMSDevice"):
    """Send SMS via outside API"""
    payload = {
        "From": self.from_number,
        "To": device.phone_number,
        "Body": token,
        "Message": str(self.get_message(token)),
    }
    if self.mapping:
        payload = sanitize_item(
            self.mapping.evaluate(
                user=device.user,
                request=None,
                device=device,
                token=token,
                stage=self,
            )
        )
    if self.auth_type == SMSAuthTypes.BEARER:
        response = get_http_session().post(
            self.account_sid,
            json=payload,
            headers={"Authorization": f"Bearer {self.auth}"},
        )
    elif self.auth_type == SMSAuthTypes.BASIC:
        response = get_http_session().post(
            self.account_sid,
            json=payload,
            auth=(self.auth, self.auth_password),
        )
    else:
        raise ValueError(f"Invalid Auth type '{self.auth_type}'")
    LOGGER.debug("Sent SMS", to=device.phone_number)
    try:
        response.raise_for_status()
    except RequestException as exc:
        LOGGER.warning(
            "Error sending token by generic SMS",
            exc=exc,
            status=response.status_code,
            body=response.text[:100],
        )
        Event.new(
            EventAction.CONFIGURATION_ERROR,
            message="Error sending SMS",
            exc=exception_to_string(exc),
            status_code=response.status_code,
            body=response.text,
        ).set_user(device.user).save()
        if response.status_code >= 400:
            raise ValidationError(response.text)
        raise