<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);
// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$message = $client
->messages("MM800f449d0399ed014aae2bcc0cc2f2ec")
->fetch();
echo $message->body;
/**
* Download the Node helper library from
* twilio.com/docs/node/install
* These consts are your accountSid and authToken from
* /console
**/
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
const authToken = 'your_auth_token'
const client = require('twilio')(accountSid, authToken)
client.messages('MM800f449d0399ed014aae2bcc0cc2f2ec')
.fetch()
.then(message => console.log(message.body))
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)
message = client.messages("MM800f449d0399ed014aae2bcc0cc2f2ec") \
.fetch()
print(message.body.encode('utf-8'))
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'
# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)
# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@message = @client.api.messages('MM800f449d0399ed014aae2bcc0cc2f2ec').fetch
puts @message.body
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Message;
public class Example {
// Find your Account Sid and Token at twilio.com/user/account
public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
public static final String AUTH_TOKEN = "your_auth_token";
public static void main(String[] args) {
Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
Message message = Message.fetcher("MM5ef8732a3c49700934481addd5ce1659").fetch();
System.out.println(message.getBody());
}
}
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
class Example
{
static void Main(string[] args)
{
// Find your Account Sid and Auth Token at twilio.com/console
const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const string authToken = "your_auth_token";
TwilioClient.Init(accountSid, authToken);
var message = MessageResource.Fetch("MM800f449d0399ed014aae2bcc0cc2f2ec");
Console.WriteLine(message.Body);
}
}