def filter_payload(payload: str) ->str:
    """ Convert payload to text and search for not allowed symbols. """
    import re
    if not isinstance(payload, str):
        payload = str(payload)
    if re.search('[^_A-z0-9-]', payload):
        message = (
            'Wrong payload! Only A-Z, a-z, 0-9, _ and - are allowed. We recommend to encode parameters with binary and other types of content.'
            )
        raise ValueError(message)
    return payload
