The Yo API: The Possibilities Are Endless

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?

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://evanbyrne.com Evan Byrne

    Yo

  • matt

    I miss my Yo-yo.

  • OphelieLechat

    I was an early Yo-skeptic, but one of SitePoint’s developers was so enthusiastic that I had to give it a try… and now I’m hooked. We’re playing around with a few integrations at the office, hopefully we’ll have something good to show off next week!

  • M S

    No

  • http://dada.theblogbowl.in/ Shaumik Daityari

    Hi Tim,

    I am skeptical about one thing. Just like the app, the API would also print out just “Yo”, right? Can’t we skip using the API and just print it out ourselves whenever we feel like?

  • hustlerprenuer

    Yo!

  • rsanchez1

    Yo is why everyone hates Bro culture.

  • http://www.boardingpass.io Boarding pass

    Yo!

    Using jQuery to call Yo API is a bad idea, since you should keep your API key secret.

    Even if javascript code is obfuscated, it is pretty is to retrieve the API key from the browser request log.