{"_id":"550ada9e921b7d0d0022888a","category":{"_id":"550ada9d921b7d0d0022887b","__v":1,"pages":["550ada9e921b7d0d00228888","550ada9e921b7d0d00228889","550ada9e921b7d0d0022888a","550ada9e921b7d0d0022888b"],"version":"550ada9d921b7d0d00228876","project":"550a379f635c660d00527fd8","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-03-19T02:59:32.696Z","from_sync":false,"order":6,"slug":"resources","title":"Resources"},"project":"550a379f635c660d00527fd8","user":"550a378e635c660d00527fd7","__v":7,"version":{"_id":"550ada9d921b7d0d00228876","forked_from":"550a3b2542fff40d00ae5ffb","project":"550a379f635c660d00527fd8","__v":3,"createdAt":"2015-03-19T14:18:05.245Z","releaseDate":"2015-03-19T14:18:05.245Z","categories":["550ada9d921b7d0d00228877","550ada9d921b7d0d00228878","550ada9d921b7d0d00228879","550ada9d921b7d0d0022887a","550ada9d921b7d0d0022887b","550ada9d921b7d0d0022887c","550ada9d921b7d0d0022887d","5523e61e71c0542100993493","55246f72ccc28a0d0062c560"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-03-19T03:00:04.370Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"The syntax is the same in both Node and in the Browser. The differences lie in restrictions (what will work, and what will not).\n\n# Node.js\nCan not use Implicit based OAuth, otherwise there are no restrictions.\n\n# Browser JavaScript\n[Implicit based OAuth](doc:oauth-implicit) is the only way to make *authenticated* calls when using browser JavaScript (unless writing an extension).\n\n# Browser Extensions\nMost browsers allow the white listing of domains. The following domains will need to be whitelisted:\n\n- https://www.reddit.com\n- https://oauth.reddit.com\n\n[Implicit based OAuth](doc:oauth-implicit) will work in a browser extension, but it is possible to use [Explicit based OAuth](doc:oauth-explicit) as well (useful to take advantage of refresh tokens).","excerpt":"","slug":"node-vs-browser","type":"basic","title":"Node vs. Browser"}
The syntax is the same in both Node and in the Browser. The differences lie in restrictions (what will work, and what will not). # Node.js Can not use Implicit based OAuth, otherwise there are no restrictions. # Browser JavaScript [Implicit based OAuth](doc:oauth-implicit) is the only way to make *authenticated* calls when using browser JavaScript (unless writing an extension). # Browser Extensions Most browsers allow the white listing of domains. The following domains will need to be whitelisted: - https://www.reddit.com - https://oauth.reddit.com [Implicit based OAuth](doc:oauth-implicit) will work in a browser extension, but it is possible to use [Explicit based OAuth](doc:oauth-explicit) as well (useful to take advantage of refresh tokens).