Webhook
The webhook is generally responsible for verifying requests sent to your webhook URL. Requests sent from a source other than BuyCoins is regarded as malicious.
The webhook class is instantiated with three arguments:
body
: request bodytoken
: webhook token from BuyCoins accountheader-signature
: request header signature defaulting to "X-Webhook-Signature"
verify_request()
This method, when called, verifies the legitimacy of the arguments passed when instantiating the class. The method returns a boolean:
True: if the request originated from BuyCoins
False: if the request didn't originate from BuyCoins
Example
For a more detailed explanation of BuyCoins' webhook, refer to BuyCoins' documentation.
Last updated