twilio / twilio-python

A Python module for communicating with the Twilio API and generating TwiML.

Home Page:https://www.twilio.com/docs/libraries/python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Verify API Rate-Limit Bucket creation fails due to invalid parameter 'Interval'

tasercake opened this issue · comments

Issue Summary

Tried to create a new bucket on a new service rate limit via the Verify API, but failed.

Steps to Reproduce

Use the Twilio Python SDK to create a new bucket on a Service Rate Limit via the Verify API

Code Snippet

from twilio.rest import Client

client = Client("account_sid", "auth_token").verify.services("service_sid")
rate_limit = client.rate_limits.create("key", description="description")
# Works fine up to here

rate_limit.buckets.create(5, 3600)

Exception/Log

File "/home/krishna/.pyenv/versions/hypotenuse/lib/python3.7/site-packages/twilio/rest/verify/v2/service/rate_limit/bucket.py", line 48, in create
    payload = self._version.create(method='POST', uri=self._uri, data=data, )
  File "/home/krishna/.pyenv/versions/hypotenuse/lib/python3.7/site-packages/twilio/base/version.py", line 205, in create
    raise self.exception(method, uri, response, 'Unable to create record')
twilio.base.exceptions.TwilioRestException: HTTP 400 error: Unable to create record: Invalid parameter: Interval

Technical details:

  • twilio-python version: 7.8.1
  • python version: 3.7.12

In order to properly debug this issue, please file a support ticket.