Skip to content Skip to sidebar Skip to footer

Error With Signature Token When Filling A Typeform

I'm learning Python and I'm trying to fill a type form using Python requests, however I get this error response: {'code':'VALIDATION_ERROR','description':'The provided body is malf

Solution 1:

This issue arises if you store the epochTime before getting the token from the HTTPS response, presumably because the server then fails to match the signature and time, resulting in "signature mismatch".

You can fix this by taking the current time after the token response has been received, i.e.:

token = requests.get("https://mehdikhireddine.typeform.com/app/form/result/token/OcotDC/default")
epochTime = int(time.time())

Output:

{"message":"success"}

Note that this may still intermittently fail if too much time elapses between getting the response and getting the epochTime.

Post a Comment for "Error With Signature Token When Filling A Typeform"