{"action":"created","issue":{"url":"https://api.github.com/repos/jsforce/jsforce/issues/503","repository_url":"https://api.github.com/repos/jsforce/jsforce","labels_url":"https://api.github.com/repos/jsforce/jsforce/issues/503/labels{/name}","comments_url":"https://api.github.com/repos/jsforce/jsforce/issues/503/comments","events_url":"https://api.github.com/repos/jsforce/jsforce/issues/503/events","html_url":"https://github.com/jsforce/jsforce/issues/503","id":163702566,"number":503,"title":"Invalid URI \"/services/data/v36.0\" ","user":{"login":"shubhamr","id":5059722,"avatar_url":"https://avatars.githubusercontent.com/u/5059722?v=3","gravatar_id":"","url":"https://api.github.com/users/shubhamr","html_url":"https://github.com/shubhamr","followers_url":"https://api.github.com/users/shubhamr/followers","following_url":"https://api.github.com/users/shubhamr/following{/other_user}","gists_url":"https://api.github.com/users/shubhamr/gists{/gist_id}","starred_url":"https://api.github.com/users/shubhamr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubhamr/subscriptions","organizations_url":"https://api.github.com/users/shubhamr/orgs","repos_url":"https://api.github.com/users/shubhamr/repos","events_url":"https://api.github.com/users/shubhamr/events{/privacy}","received_events_url":"https://api.github.com/users/shubhamr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-04T15:55:53Z","updated_at":"2016-07-11T14:41:46Z","closed_at":null,"body":"Can Somebody explain me , why code 1 fails and gives error <Invalid URI \"/services/data/v36.0\" > while code 2 passes . \r\n\r\nvar conn1 = new jsforce.Connection({\r\n  oauth2: {\r\n\r\n    loginUrl: 'sandbox-login-url',\r\n    redirectUri: 'sandbox-login-url'\r\n  }\r\n});\r\n\r\n**Code 1**\r\nconn1.login('username', 'password', function (err, userInfo) {\r\n  if (err) { return console.error(err); }\r\nconsole.log(\"Org ID 1: \" + userInfo.organizationId);\r\n});\r\n\r\nconn1.identity(function (err, res) {\r\nif (err) { return console.error(err); }\r\nconsole.log(\"user ID conn1: \" + res.user_id);\r\n\r\nconsole.log(\"display name conn1 :  \" + res.display_name);\r\n});\r\n\r\n**Code 2**\r\nconn1.login('username', 'password', function (err, userInfo) {\r\n  if (err) { return console.error(err); }\r\nconsole.log(\"Org ID 1: \" + userInfo.organizationId);\r\n\r\nconn1.identity(function (err, res) {\r\nif (err) { return console.error(err); }\r\nconsole.log(\"user ID conn1: \" + res.user_id);\r\n\r\nconsole.log(\"display name conn1 :  \" + res.display_name);\r\n});\r\n});\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jsforce/jsforce/issues/comments/231755085","html_url":"https://github.com/jsforce/jsforce/issues/503#issuecomment-231755085","issue_url":"https://api.github.com/repos/jsforce/jsforce/issues/503","id":231755085,"user":{"login":"cloxure","id":2006175,"avatar_url":"https://avatars.githubusercontent.com/u/2006175?v=3","gravatar_id":"","url":"https://api.github.com/users/cloxure","html_url":"https://github.com/cloxure","followers_url":"https://api.github.com/users/cloxure/followers","following_url":"https://api.github.com/users/cloxure/following{/other_user}","gists_url":"https://api.github.com/users/cloxure/gists{/gist_id}","starred_url":"https://api.github.com/users/cloxure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloxure/subscriptions","organizations_url":"https://api.github.com/users/cloxure/orgs","repos_url":"https://api.github.com/users/cloxure/repos","events_url":"https://api.github.com/users/cloxure/events{/privacy}","received_events_url":"https://api.github.com/users/cloxure/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T14:41:46Z","updated_at":"2016-07-11T14:41:46Z","body":"@shubhamr  what version of jsforce are you using?"}}
{"actor":{"display_login":"cloxure"}}