The Yo API: The Possibilities Are Endless

Share this article

Yo has gotten quite a bit of attention recently. If you haven’t heard of Yo before, the concept is simple. You download the app, add your friends, and tap on their usernames to send them a notification that says “Yo” (complete with sound effect). That’s it. The app has been called useless, insecure, brilliant, and incredibly versatile.

The API

Whatever you choose to believe about the well-funded, recently “viral” app, their API allows for more than just one-way communication between you and your friends.

The Medium post that announces the Yo API highlights some example use cases.

  1. A blog can Yo the readers whenever a new post is published. Imagine getting a Yo From PRODUCTHUNT.
  2. An online store can Yo its customers whenever a new product is offered. Imagine getting a Yo From JENNASHOPIFY.
  3. A football club can Yo the fans whenever the team scores a touchdown. Imagine getting a Yo From THE49ERS.
  4. An ice-cream truck can Yo the kids when it’s around the corner.… Imagine getting a Yo From THEICECREAMTRUCK.

The API is pretty simple. It has one endpoint, http://api.justyo.co/yoall/. Sending a POST request to that URL with your API token will send a Yo notification to everyone who has added your application username. A Python demo containing this example has been posted to GitHub by the Yo team.

Here’s how you would send a POST request to Yo using jQuery:

function yoAll(apitokenvalue) {
  $.post('http://api.justyo.co/yoall/', { 'api_token': apitokenvalue });
}

yoAll(your API token);

Do even more with Yo

When registering for your token, Yo requests a callback URL. This enables Yo to send a GET request to your site whenever a user sends a Yo notification to your app username. The GET request will contain the username of the person sending the notification. As long as you have the username, you can use an intermediary to connect a Yo notification to other apps.

How would this work? Lets say you wanted to allow a user to log into your application just by sending a Yo notification to your Yo app username (assuming of course that this would be a secure thing to do). To enable this functionality, you would need the user to give you their Yo username and have them add your application username to their list of Yo contacts.

You could then store the users Yo credentials, listen for a Yo notification on the callback url, and log the user into your application when the users Yo credentials match the received Yo notification.

IFTTT uses this method to connect Yo to other apps, and contains several recipies that enable you to turn off your lights, adjust your thermostat, and even save you from a bad date, just by sending them a Yo!

The concept is interesting, with as many potential uses as there are apps and services. What would you do with the Yo API? Can you see a place for it in your app?

Tim EvkoTim Evko
View Author

Tim Evko is a front end web developer from New York, with a passion for responsive web development, Sass, and JavaScript. He lives on coffee, CodePen demos and flannel shirts.

apiappmobileyo
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week