{"_id":"55b96120b42b610d00c9b299","__v":17,"project":"54295508cd35120800fceca2","version":{"_id":"55b9611eb42b610d00c9b28d","__v":4,"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"},"category":{"_id":"55b9611fb42b610d00c9b28f","pages":["55b96120b42b610d00c9b298","55b96120b42b610d00c9b299","56a3ee7395be510d00cb9c3b","56e6bb8c05390f2b002d5ceb"],"project":"54295508cd35120800fceca2","__v":3,"version":"55b9611eb42b610d00c9b28d","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-29T22:40:44.562Z","from_sync":false,"order":1,"slug":"authentication","title":"Authentication"},"user":"542954f6cd35120800fceca0","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-29T22:41:04.838Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What is OAuth?\"\n}\n[/block]\n\"OAuth provides client applications a 'secure delegated access' to server resources on behalf of a resource owner.\" Or in English: you can develop an app that users can give access to their account, without giving you their password.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"When do I use OAuth?\"\n}\n[/block]\nUse OAuth when you want to create a client that interacts with the Yo API on behalf of **other users.**  [OAuth page](https://dash.readme.io/project/yoapp/v2.0/docs/oauth) \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How do I create an OAuth client?\"\n}\n[/block]\nStart by logging in to https://dev.justyo.co (use your personal Yo account credentials)\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/mjdnOsO4QF9Sak02UUEo_Screen%20Shot%202015-07-29%20at%203.43.53%20PM.png\",\n        \"Screen Shot 2015-07-29 at 3.43.53 PM.png\",\n        \"1010\",\n        \"721\",\n        \"#843c9c\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nOr signing up if we don't have a Yo account\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/YiSTKju7RjKPQbdgoh1i_Screen%20Shot%202015-07-29%20at%203.45.04%20PM.png\",\n        \"Screen Shot 2015-07-29 at 3.45.04 PM.png\",\n        \"1010\",\n        \"744\",\n        \"#8c44a4\",\n        \"\"\n      ],\n      \"border\": false\n    }\n  ]\n}\n[/block]\n1. Tap on **Apps** \n2. Tap on **Create App** \n3. Fill the name of your new app (client in OAuth terms), the description, and a redirect URI.\n4. Tap **Create**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ASD0zIcRLil3piKuPslg_Create%20new%20client.png\",\n        \"Create new client.png\",\n        \"758\",\n        \"483\",\n        \"#344b5b\",\n        \"\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\nNow head to the **Apps By Me** tab to view your newly created YoAuth client.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4n7eJVOS9OknZkAFrm7s_View%20new%20client%20info.png\",\n        \"View new client info.png\",\n        \"753\",\n        \"470\",\n        \"#5f83b4\",\n        \"\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Now that you have your newly created YoAuth credentials, take a look at some code samples:\"\n}\n[/block]\nURLs:\n* Authorize URL - https://dashboard.justyo.co/authorize/\n* Token URL - https://dashboard.justyo.co/token/\n* API Base URL - https://api.justyo.co\n\nSample Code using OAuth:\n* Web: [Yo Pugs - Send pug gifs](https://github.com/YoApp/yo-pugs)\n* OSX: [Yo Status - Set your Yo Status](https://github.com/Rooftoptek/Yo-Status-OSX)","excerpt":"","slug":"oauth","type":"basic","title":"OAuth 2.0"}
[block:api-header] { "type": "basic", "title": "What is OAuth?" } [/block] "OAuth provides client applications a 'secure delegated access' to server resources on behalf of a resource owner." Or in English: you can develop an app that users can give access to their account, without giving you their password. [block:api-header] { "type": "basic", "title": "When do I use OAuth?" } [/block] Use OAuth when you want to create a client that interacts with the Yo API on behalf of **other users.** [OAuth page](https://dash.readme.io/project/yoapp/v2.0/docs/oauth) [block:api-header] { "type": "basic", "title": "How do I create an OAuth client?" } [/block] Start by logging in to https://dev.justyo.co (use your personal Yo account credentials) [block:image] { "images": [ { "image": [ "https://files.readme.io/mjdnOsO4QF9Sak02UUEo_Screen%20Shot%202015-07-29%20at%203.43.53%20PM.png", "Screen Shot 2015-07-29 at 3.43.53 PM.png", "1010", "721", "#843c9c", "" ] } ] } [/block] Or signing up if we don't have a Yo account [block:image] { "images": [ { "image": [ "https://files.readme.io/YiSTKju7RjKPQbdgoh1i_Screen%20Shot%202015-07-29%20at%203.45.04%20PM.png", "Screen Shot 2015-07-29 at 3.45.04 PM.png", "1010", "744", "#8c44a4", "" ], "border": false } ] } [/block] 1. Tap on **Apps** 2. Tap on **Create App** 3. Fill the name of your new app (client in OAuth terms), the description, and a redirect URI. 4. Tap **Create** [block:image] { "images": [ { "image": [ "https://files.readme.io/ASD0zIcRLil3piKuPslg_Create%20new%20client.png", "Create new client.png", "758", "483", "#344b5b", "" ], "border": true } ] } [/block] Now head to the **Apps By Me** tab to view your newly created YoAuth client. [block:image] { "images": [ { "image": [ "https://files.readme.io/4n7eJVOS9OknZkAFrm7s_View%20new%20client%20info.png", "View new client info.png", "753", "470", "#5f83b4", "" ], "border": true } ] } [/block] [block:api-header] { "type": "basic", "title": "Now that you have your newly created YoAuth credentials, take a look at some code samples:" } [/block] URLs: * Authorize URL - https://dashboard.justyo.co/authorize/ * Token URL - https://dashboard.justyo.co/token/ * API Base URL - https://api.justyo.co Sample Code using OAuth: * Web: [Yo Pugs - Send pug gifs](https://github.com/YoApp/yo-pugs) * OSX: [Yo Status - Set your Yo Status](https://github.com/Rooftoptek/Yo-Status-OSX)