Ir al contenido

Webhook.generate_test_header()

Esta página aún no está disponible en tu idioma.

Methodtryyoursize

A valid TYS-Signature value, for your own tests.

@staticmethod
def generate_test_header(payload: Union[bytes, str], secret: str, timestamp: Optional[int] = None) -> str
payloadUnion[bytes, str]Obligatorio

The body you will send.

secretstrObligatorio

The signing secret.

timestampOptional[int]Opcional= None

Unix seconds (default now).

str: A valid TYS-Signature value.

payload = json.dumps({"id": "evt_test", "object": "event", "type": "webhook.test", "data": {}})
header = tryyoursize.Webhook.generate_test_header(payload, "whsec_test")

¿Te ha resultado útil esta página?