Python SDK - 'Field "null" was of unexpected type' when creating a webhook

integration
integration ✭✭
edited 09/17/21 in API & Developers

I'm trying to create a webhook using the smartsheet-python-sdk (2.105.1):

webhook = Smartsheet.models.webhook.Webhook(
    props={
        "name": "[redacted]",
        "callbackUrl": "[redacted]",
        "scope": "sheet",
        "scopeObjectId":"[redacted]"
        "events": ["[*.*]"],
        "version": 1
    }
)

print(webhooks.create_webhook(webhook))

I'm getting the following error, however:

{
  "result": {
    "code": 1008,
    "errorCode": 1008,
    "message": "Unable to parse request. The following error occurred: Field \"null\" was of unexpected type.",
    "name": "ApiError",
    "recommendation": "Do not retry without fixing the problem. ",
    "refId": "1dba9ihewshe0",
    "shouldRetry": false,
    "statusCode": 400
  }
}

Can someone fill me in on what I'm doing wrong here?

Answers