Closed adamgotterer closed 2 years ago
@adamgotterer unfortunately I am unable to recreate your issue with similar code. I've pasted it below for reference:
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)
begin
conference = @client.conferences("CFxxxx").fetch
@participants = conference.participants
@participants.each { |participant|
puts participant.to_s
}
rescue
puts @client.http_client.last_request
end
My initial instinct was to suggest double checking the correctness of your conference sid, however when I changed my test sid to an invalid sid, my error message is slightly different. If you add puts @client.http_client.last_request
after your call to @client.conferences().fetch
, what is the HTTP method that gets printed in the output?
I found another way to successfully get the data I was looking for. However, your initial instinct was correct that the sid was invalid.
I copy and pasted the code you shared and the exception is the same and this is the last_request:
(XXXXX,XXXXX) GET https://api.twilio.com/2010-04-01/Accounts/XXXXX/Conferences/CFf484ced72cbad29525ee4837cb59d012.json
-H "User-Agent": "twilio-ruby/5.61.1 (ruby/x86_64-darwin15 2.3.0-p0)"
-H "Accept-Charset": "utf-8"
-H "Accept": "application/json"
Do you get the expected behavior when you use the correct sid?
Apologies, that conference sid was a known invalid sid (I meant to change to CFxxx.. for clarity) and, regardless, each sid is tried directly to your account sid, so a conference sid that works correctly for me would not work for you, and vice versa.
Closing due to lack of customer response.
Issue Summary
Unable to get a list of conference participants
Code Snippet
Exception/Log
Technical details: