{"__v":3,"_id":"55b96120b42b610d00c9b29f","category":{"project":"54295508cd35120800fceca2","version":"55b9611eb42b610d00c9b28d","_id":"56ae7f53be2c040d00d5a09b","pages":[],"__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-31T21:40:35.776Z","from_sync":false,"order":4,"slug":"webhooks","title":"Webhooks"},"project":"54295508cd35120800fceca2","user":"542954f6cd35120800fceca0","version":{"__v":4,"_id":"55b9611eb42b610d00c9b28d","project":"54295508cd35120800fceca2","createdAt":"2015-07-29T23:26:22.532Z","releaseDate":"2015-07-29T23:26:22.532Z","categories":["55b9611fb42b610d00c9b28e","55b9611fb42b610d00c9b28f","55b9611fb42b610d00c9b290","55b9611fb42b610d00c9b291","55b9611fb42b610d00c9b292","55b9611fb42b610d00c9b293","55bc25ee76754617002aa893","56ae7f53be2c040d00d5a09b","56ae7f7b0c1cab0d009f65d1"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"updates":["5434553cedce0408004096ce","55ad5a5133616a0d00599d70"],"next":{"pages":[],"description":""},"createdAt":"2014-09-29T22:47:31.127Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":0,"body":"To receive a Yo on an API account, all you need to do is setup a \"**Callback URL**\" in the developer dashboard: https://dashboard.justyo.co.  \nThis callback URL will receive a GET request every time someone sends a Yo to your API account.\n\nThere will be GET parameters:  \n\"***username***\" - the username that sent the Yo, which is now subscribed to your service and will receive a Yo when you use \"yoall\"\n\n\"***link***\" - (Optionl) If the user provided a link, you will get it as a \"link\" parameter\n\n\"***location***\" - (Optional) If the user provided location you get a parameter formatted as: \"latitude;longitude\"\nFor example: \"42.360091;-71.094159\" which are the latitude and longitude of MIT:     \nhttps://www.google.com/maps/search/42.360091,-71.0941599\n\nWe recommend you use [ngrok](https://ngrok.com/) while development to expose your local development server and set it as the callback URL\n\nEvery time the user Yo's your account our servers will hit your callback URL like this:\nhttp://yourcallbackurl.com/yourendpoint?username=THEYOER&location=42.360091;-71.094159\n\nYou can test your server by copying the URL above and replacing *http://yourcallbackurl.com/yourendpoint* with your callback URL\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/BulzUW19SXOpqAZSLl0X_Screen%20Shot%202016-02-22%20at%2011.26.47%20AM.png\",\n        \"Screen Shot 2016-02-22 at 11.26.47 AM.png\",\n        \"768\",\n        \"862\",\n        \"#7e534d\",\n        \"\"\n      ],\n      \"caption\": \"In the top bar click \\\"Edit Profile\\\" and set your callback URL\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"receiving-a-yo-with-the-api","type":"basic","title":"Receiving a Yo"}
To receive a Yo on an API account, all you need to do is setup a "**Callback URL**" in the developer dashboard: https://dashboard.justyo.co. This callback URL will receive a GET request every time someone sends a Yo to your API account. There will be GET parameters: "***username***" - the username that sent the Yo, which is now subscribed to your service and will receive a Yo when you use "yoall" "***link***" - (Optionl) If the user provided a link, you will get it as a "link" parameter "***location***" - (Optional) If the user provided location you get a parameter formatted as: "latitude;longitude" For example: "42.360091;-71.094159" which are the latitude and longitude of MIT: https://www.google.com/maps/search/42.360091,-71.0941599 We recommend you use [ngrok](https://ngrok.com/) while development to expose your local development server and set it as the callback URL Every time the user Yo's your account our servers will hit your callback URL like this: http://yourcallbackurl.com/yourendpoint?username=THEYOER&location=42.360091;-71.094159 You can test your server by copying the URL above and replacing *http://yourcallbackurl.com/yourendpoint* with your callback URL [block:image] { "images": [ { "image": [ "https://files.readme.io/BulzUW19SXOpqAZSLl0X_Screen%20Shot%202016-02-22%20at%2011.26.47%20AM.png", "Screen Shot 2016-02-22 at 11.26.47 AM.png", "768", "862", "#7e534d", "" ], "caption": "In the top bar click \"Edit Profile\" and set your callback URL" } ] } [/block]