Python (django) signature problem


#1

Hi,
I am working on integration in python, but I have a problem with verifying the signature. When I try to verify vendor test webhook payload without spaces and breaks, it’s valid, but when comes to the real webhook, it’s generating different signatures. Both payloads look the same. I don’t know if there is a problem with encoding or python has some sort of inside formatting of the payload of the request body… Does anyone have a clue what could be the problem?

Thank you


#2

Can you assist :point_up: @BegaMutex

Thanks


#3

@cnorin or @Egg maybe can help :wink:


#4

As per the API, “the test webhook is formatted for ease of reading when displayed in the browser”. The test webhook will have new lines and spaces and the signature will be generated expecting that.

The real webhook will not have spaces and its signature will be generated based on that.

Please see this post for a similar issue: Webhook/API Poll Signature Broken?

Hope this helps.

Egg


#5

@c6c1b7d0389111b0c94e Hey, I was the one having that same issue… Feel free to PM me personally, I’m more than happy to help :slight_smile:


#6

Hi, thank you, but now I have a problem to find the way how to send private message. :smiley: . I can’t find any option to send new private message except reply option :open_mouth:


#7

Hi,

yes, I count with that. But still… How I said, testing webhook after formatting the payload is valid and I have same hash. Only the real webhook payload after hashing is invalid. :confused:

Thank you.