Cant enable webhook in python
Hi,
Im trying to enable a webhook in python with this code, but Im just having this error :
disabledDetails": "Response was missing verification response in both header and body, or body JSON may have been invalid. (ref id: latvtu)", "enabled": false
in that sense, I think that the callback url is well configured because when I runing the previous code to activate the webhook, an aws lambda function is triggered that has that url created in aws´s apigateaway which gives this log
As you can see it, the Smartsheet-Hook- Response is not in the header that the webhook sent, however I run this code in aws lambda that should handle that case that the challenge is not in that header but in the body, :
import json
def lambda_handler(event, context):
print("Evento completo recibido:", json.dumps(event))
if "challenge" in event:
challenge = event.get("challenge")
# Respond to verification challenge
return {
"statusCode": 200,
"headers": {
"Content-Type": "application/json",
"Smartsheet-Hook-Response": challenge # Enviar desafío en el encabezado
},
"body": json.dumps({"smartsheetHookResponse": challenge})
print("Respuesta enviada:", json.dumps(response))
return {
'statusCode': 200,
'body': 'Data received and processed successfully
but It did not work either, can any of you could guide me how to solve this. I tried another version of that code that I saw on internet but cant reach a solution.
grateful in advance.
greetings.
Answers
-
Hi @alexismgg.31!
Currently, Smartsheet Support does not handle SDK-related inquiries. If you’ve tested and found an issue with the SDK, please report it on the relevant GitHub page. You can access the links to these pages in our API documentation here: Smartsheet API Documentation.
Should you not get a response from the Community, consider checking out StackOverflow to connect with other developers to get more help.
Cheers,
Isaac.Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives