When trying to submit a tollfree_verification through the Ruby SDK, I get Missing required parameter *param* in the post body for any array params, so for OptInImageUrls and UseCaseCategories, even though those params are included and are of type Array. I am doing this through a sub account - by initializing the Twilio::REST::Client like so @sub_account_client ||= Twilio::REST::Client.new(ACCOUNT_SID, AUTH_TOKEN, sub_account_sid).
I've also embedded some output in twilio-ruby-6.5.0/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb in the create and I can see that the OptInImageUrls and UseCaseCategories are present there.
/app/vendor/bundle/ruby/2.7.0/gems/twilio-ruby-6.5.0/lib/twilio-ruby/framework/rest/version.rb:146:in `create': [HTTP 400] 20001 : Unable to create record (Twilio::REST::RestError)
Missing required parameter OptInImageUrls in the post body
https://www.twilio.com/docs/errors/20001
Or when just sending a single string for OptInImageUrls:
/app/vendor/bundle/ruby/2.7.0/gems/twilio-ruby-6.5.0/lib/twilio-ruby/framework/rest/version.rb:146:in `create': [HTTP 400] 20001 : Unable to create record (Twilio::REST::RestError)
Missing required parameter UseCaseCategories in the post body
https://www.twilio.com/docs/errors/20001
Faraday Request
I, [2023-08-29T14:12:53.062589 #41] INFO -- request: POST https://messaging.twilio.com/v1/Tollfree/Verifications
I, [2023-08-29T14:12:53.062668 #41] INFO -- request: User-Agent: "twilio-ruby/6.3.0 (linux-gnu x86_64) Ruby/2.7.2"
Accept-Charset: "utf-8"
Content-Type: "application/x-www-form-urlencoded"
Accept: "application/json"
I, [2023-08-29T14:12:53.063234 #41] INFO -- request: {"BusinessName"=>"FOO BAR",
"BusinessWebsite"=>"https://www.foo.com/",
"NotificationEmail"=>"it@foo.net",
"UseCaseCategories"=>["ACCOUNT_NOTIFICATIONS", "EVENTS"],
"UseCaseSummary"=>
"This is our use case",
"ProductionMessageSample"=>
"These are our production message samples,
"OptInImageUrls"=>
["https://i.imgur.com/valid_id_1.png",
"https://i.imgur.com/valid_id_2.png",
"https://i.imgur.com/valid_id_3.png"],
"OptInType"=>"WEB_FORM",
"MessageVolume"=>"1,000",
"TollfreePhoneNumberSid"=>"tollfreesid",
"BusinessStreetAddress"=>"123 Test",
"BusinessStreetAddress2"=>nil,
"BusinessCity"=>"Test City",
"BusinessStateProvinceRegion"=>"KS",
"BusinessPostalCode"=>"11111",
"BusinessCountry"=>"US",
"AdditionalInformation"=>nil,
"BusinessContactFirstName"=>"First",
"BusinessContactLastName"=>"Name",
"BusinessContactEmail"=>"foo@bar.net",
"BusinessContactPhone"=>"5555555555"}
I, [2023-08-29T14:12:53.099626 #41] INFO -- response: Status 400
I, [2023-08-29T14:12:53.099702 #41] INFO -- response: date: "Tue, 29 Aug 2023 14:12:53 GMT"
content-type: "application/json; charset=utf-8"
content-length: "160"
connection: "keep-alive"
twilio-request-id: "RQ255024230fbe1ade3b571cd12d7ac195"
twilio-request-duration: "0.004"
access-control-allow-origin: "*"
access-control-allow-headers: "Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Idempotency-Key"
access-control-allow-methods: "GET, POST, DELETE, OPTIONS"
access-control-expose-headers: "ETag"
access-control-allow-credentials: "true"
x-powered-by: "AT-5000"
strict-transport-security: "max-age=31536000"
twilio-concurrent-requests: "1"
x-shenanigans: "none"
x-home-region: "us1"
x-api-domain: "messaging.twilio.com"
I, [2023-08-29T14:12:53.099743 #41] INFO -- response: {"code": 20001, "message": "Missing required parameter OptInImageUrls in the post body", "more_info": "https://www.twilio.com/docs/errors/20001", "status": 400}
Issue Summary
When trying to submit a
tollfree_verification
through the Ruby SDK, I getMissing required parameter *param* in the post body
for any array params, so forOptInImageUrls
andUseCaseCategories
, even though those params are included and are of typeArray
. I am doing this through a sub account - by initializing the Twilio::REST::Client like so@sub_account_client ||= Twilio::REST::Client.new(ACCOUNT_SID, AUTH_TOKEN, sub_account_sid)
.I've also embedded some output in
twilio-ruby-6.5.0/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb
in thecreate
and I can see that theOptInImageUrls
andUseCaseCategories
are present there.Steps to Reproduce
client
with a sub account SIDclient.messaging.v1.tollfree_verifications.create(params)
Code Snippet
Exception/Log
Or when just sending a single string for OptInImageUrls:
Faraday Request
Technical details:
6.5.0
2.7.2