devudilip
devudilip

Reputation: 1275

NameError: uninitialized constant Twilio::JWT

Getting an error while trying to generate access token for video Using twilio-ruby (4.11.1), ruby 2.4.1, rails 5.1.0.

Code:

    # Create an Access Token
    token = Twilio::JWT::AccessToken.new(account_sid, api_key, api_secret, identity);

following the twilio official Doc. https://www.twilio.com/docs/api/video/user-identity-access-tokens#ruby

Error which am facing:

NameError: uninitialized constant Twilio::JWT

Upvotes: 0

Views: 1469

Answers (1)

philnash
philnash

Reputation: 73037

Twilio developer evangelist here.

That example code appears to be written for the upcoming version 5 of the Twilio Ruby gem. The version 5 gem is at rc23 so I recommend using that to create your access token as it has the methods required to make a Video Grant for the rooms API.

Let me know if that helps at all.

Upvotes: 1

Related Questions