Sha256: 2bc13f49dd4b8fd0883708e506f99f7233ca6aceb05485e289f07d81b891634e

Contents?: true

Size: 1.1 KB

Versions: 37

Compression:

Stored size: 1.1 KB

Contents

.. module:: twilio.rest.resources

=================
Caller Ids
=================


Validate a Phone Number
-----------------------

Validating a phone number is quick and easy.

.. code-block:: ruby

    require 'twilio-ruby'

    # To find these visit https://www.twilio.com/user/account
    account_sid = "ACXXXXXXXXXXXXXXXXX"
    auth_token = "YYYYYYYYYYYYYYYYYY"

    @client = Twilio::REST::Client.new account_sid, auth_token
    @response = @client.outgoing_caller_ids.create(
      phone_number: "+44 9876543212"
    )
    puts @response.validation_code

Twilio will call the provided number and wait for the validation code to be
entered.

Delete a Phone Number
---------------------

Deleting a phone number is quick and easy.

.. code-block:: ruby

    require 'twilio-ruby'

    # To find these visit https://www.twilio.com/user/account
    account_sid = "ACXXXXXXXXXXXXXXXXX"
    auth_token = "YYYYYYYYYYYYYYYYYY"

    @client = Twilio::REST::Client.new account_sid, auth_token

    @response = @client.outgoing_caller_ids.list(phone_number: "+15555555555")
    @callerid = response[0]
    @callerid.delete()

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
twilio-ruby-4.13.0 docs/usage/caller-ids.rst
twilio-ruby-4.12.1 docs/usage/caller-ids.rst
twilio-ruby-4.11.1 docs/usage/caller-ids.rst
twilio-ruby-4.11.0 docs/usage/caller-ids.rst
twilio-ruby-4.10.0.edge docs/usage/caller-ids.rst
twilio-ruby-4.10.0 docs/usage/caller-ids.rst
twilio-ruby-4.9.1 docs/usage/caller-ids.rst
twilio-ruby-4.9.1.edge docs/usage/caller-ids.rst
twilio-ruby-4.9.0 docs/usage/caller-ids.rst
twilio-ruby-4.9.0.edge docs/usage/caller-ids.rst
twilio-ruby-4.8.0 docs/usage/caller-ids.rst
twilio-ruby-4.7.0 docs/usage/caller-ids.rst
twilio-ruby-4.8.3.edge docs/usage/caller-ids.rst
twilio-ruby-4.8.2.edge docs/usage/caller-ids.rst
twilio-ruby-4.8.1.edge docs/usage/caller-ids.rst
twilio-ruby-4.8.0.edge docs/usage/caller-ids.rst
twilio-ruby-4.6.2 docs/usage/caller-ids.rst
twilio-ruby-4.6.1 docs/usage/caller-ids.rst
twilio-ruby-4.6.0 docs/usage/caller-ids.rst
twilio-ruby-4.7.0.edge docs/usage/caller-ids.rst