# Using Twilio Ruby SDK

If you are using the Twilio Ruby SDK, you can override the initialize method of the base class using the following code snippet:

```go
require "twilio-ruby"

class Twilio::REST::ApiBase 
  def initialize(twilio)
    super(twilio)
    @base_url =  "https://us-west-1.twilio.to.nest.messagebird.com"
    @host = "us-west-1.twilio.to.nest.messagebird.com"
    @port = 443
    @v2010 = nil
  end
end
```

This would allow you to make a request to the MessageBird Twilio Adapter. You can try it out with the following sample code:

```go
require "twilio-ruby"

class Twilio::REST::ApiBase 
  def initialize(twilio)
    super(twilio)
    @base_url =  "https://eu-west-1.twilio.to.nest.messagebird.com"
    @host = "eu-west-1.twilio.to.nest.messagebird.com"
    @port = 443
    @v2010 = nil
  end
end

# Your Account SID and Auth Token
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"

@client = Twilio::REST::Client.new account_sid, auth_token
message = @client.messages.create(
  body: "Hello from Ruby",
  to: "+12345678901",  # Text this number
  from: "+15005550006", # From a valid MessageBird number
)

puts message.sid
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/channels-api/supported-channels/programmable-sms/twilio-exit-api/using-twilio-ruby-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
