Get the public key and algorithm used to digitally sign webhook notifications. Verifying the digital signature ensures the notification came from Circle.
In the headers of each webhook, you can find
X-Circle-Signature
: a header containing the digital signature generated by Circle.X-Circle-Key-Id
: a header containing the UUID. This is will be used as the ID
as URL parameter to retrieve the relevant public key.The universally unique identifier of the resource.
Developer-provided parameter used to identify this request. Useful when communicating with Circle Support.
1from circle.web3 import configurations
2from circle.web3 import utils
3
4client = utils.init_configurations_client(api_key=key)
5
6api_instance = utils.configurations.WebhookSubscriptionsApi(client)
7response = api_instance.get_notification_signature(id="d1b66f87-2320-5834-bcd3-175a36a4d331")
8print(response.json())
9
1{
2 "data": {
3 "id": "09379bc1-4871-45ad-8b8b-8027795df70d",
4 "algorithm": "ECDSA_SHA_256",
5 "public_key": "QFkwewylAoZIzj0CBQYIKoZIzj0DAQcDQgAEEext6d7AimvYFDAKBwsUsGXrhqmRHNPYum7V/BwfvJLmJeSMe2V0b9eWKPuFxAEH8HCY/MSZdBI+q/E6IdPnSg==",
6 "create_date": "2023-06-01T18:18:06.931526Z"
7 }
8}