API Quick Start Tutorial
Table of contents
Testing your account
Now that you have signed up for a account and received your credentials it is time to verify that they are in working order.
Testing with a browser:
Calls against Lypp will return the requested information in the format specified in the header of the request but you can force the return format by attaching an extension to the url you are calling.
http://lypp.com/users/1.xml
Testing with curl:
curl \
-X GET \
-u username:password \
-H 'Accept: application/xml' \
-H 'Content-Type: application/xml' \
http://lypp.com/users/1
Don't know your user id?
If you lost your user id to use or would like to build a service that existing Lypp users will quickly able to adopt we supply a method of retrieving the users information.
curl \
-X GET \
-u username:password \
-H 'Accept: application/xml' \
-H 'Content-Type: application/xml' \
http://lypp.com/current
Response:
For all of the above examples you will receive a response similar to the following.
200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<user>
<id type="integer">{user_id}</id>
<created-at type="datetime">{created_at}</created-at>
<updated-at type="datetime">{updated_at}</updated-at>
<lock-version type="integer">{lock_version}</lock-version>
<name>{name}</name>
<email>{email}</email>
<im>{im}</im>
<im-network>{im_network}</im-network>
<time-zone>{time_zone}</time-zone>
<member-pin>{member_pin}</member-pin>
<moderator-pin>{moderator_pin}</moderator-pin>
<terms-of-service type="boolean">{terms_of_service}</terms-of-service>
<credit-card>
<id type="integer">{credit_card_id}</id>
<created-at type="datetime">{created_at}</created-at>
<updated-at type="datetime">{updated_at}</updated-at>
<lock-version type="integer">{lock_version}</lock-version>
<name>{name}</name>
<expiry-month type="integer">{expiry_month}</expiry-month>
<expiry-year type="integer">{expiry_year}</expiry-year>
</credit-card>
<address>
<id type="integer">{address_id}</id>
<created-at type="datetime">{created_at}</created-at>
<updated-at type="datetime">{updated_at}</updated-at>
<lock-version type="integer">{lock_version}</lock-version>
<street-address>{street_address}</street-address>
<postal-code>{postal_code}</postal-code>
<location>{location}</location>
<subdivision>{subdivision}</subdivision>
<country>{country}</country>
</address>
<phone-numbers type="array">
<phone-number>
<id type="integer">{phone_number_id}</id>
<created-at type="datetime">{created_at}</created-at>
<updated-at type="datetime">{updated_at}</updated-at>
<lock-version type="integer">{lock_version}</lock-version>
<country-code type="integer">{country_code}</country-code>
<subscriber-number>{subscriber_number}</subscriber-number>
<location>{location}</location>
<extension>{extension}</extension>
</phone-number>
</phone-numbers>
</user>
Create your first conference
The first conference that we are going to create is going to very simple, it will contain only yourself as the moderator. Ensure that your phone number is set correctly on your account profile! We are going to be placing a call to that number.
Create the call:
curl \
-X POST \
-u username:password \
-H 'Accept: application/xml' \
-H 'Content-Type: application/xml' \
-d '<?xml version="1.0" encoding="UTF-8"?>
<conference>
<name>My First Lypp Call</name>
<scheduled-to-start-at type="datetime">now</scheduled-to-start-at>
</conference>' \
http://lypp.com/users/1/conferences
You phone should have immediately rang and when you picked up you should have been greeted by the Lypp IVR. There is a lot of magic that happened for you auto-magically behind the scenes to make that call happen. To start with lets take a quick look at the attendees listed under that conference to investigate what occurred.
List All Attendees
curl \
-u username:password \
-H 'Accept: application/xml' \
http://lypp.com/users/1/conferences/1/attendees
You are going to see that we automatically added you to the conference you just created as a dial-out attendee and set the moderator attribute to true on you also. This is here as a connivance if you do not wish to have yourself automatically added to a conference you are creating we provide the no-moderator optional attribute on conference creation to bypass this functionality.
Placing a direct-dial call to another person
What we refer to as a direct-dial conference is simply just allowing the attendees to enter the main conference without being presented with the Lypp dial-out IVR message or having the attendees presence announced to the conference upon entry.
Direct dial calls require one of the attendees to be a moderator before the call starts. With a direct dial conference the moderator is called first before any of the other attendees.
Create a direct-dial call:
curl \
-X POST \
-u username:password \
-H 'Accept: application/xml' \
-H 'Content-Type: application/xml' \
-d '<?xml version="1.0" encoding="UTF-8"?>
<conference>
<name>My First One-On-One Call</name>
<scheduled-to-start-at type="datetime">in 5 minutes</scheduled-to-start-at>
<direct-dial type="boolean">true</direct-dial>
</conference>' \
http://lypp.com/users/1/conferences
As with the first conference call we created above you have been automatically added to the conference as the moderator and will be the called first before we connect the other leg of the call. Lets now add the other person that we wish to call.
Adding the other party you wish to call:
curl \
-X POST \
-u username:password \
-H 'Accept: application/xml' \
-H 'Content-Type: application/xml' \
-d '<?xml version="1.0" encoding="UTF-8"?>
<attendee>
<phone-number>+1 (604) 555-5555</phone-number>
</attendee>' \
http://lypp.com/users/1/conferences/1/attendees
That is it! 5 minutes from when you created the conference you should hear your phone ring. You will be greeted with "Lypp is connecting your call" and the dial out to the other party you added will occur.
