Error: Invalid URI "/services/data/v39.0/query?q=SELECT%20Id%2C%20Name%20FROM%20Account" Not sure why this is occurring. accessToken? maybe?
conn.login returns the URI and the access token correctly. How can jsforce use this for executing a query?
Nevermind.. I found the issue. My query was outside of conn.login.
Hi @MarkBolden , I am getting a similar error from my request and I'm using a signed request in my POST call:
conn = new jsforce.Connection({signedRequest: sr});
conn.sobject('Account').create({
"Name":"Acc-001"
}, (err, val)=>{
if(err){
res.send(There are errors >>> ${err});
} else {
res.send(There is a success >>> ${val});
}
});
This is just a test route I used to debug, and can see: Error: Invalid URI "/services/data/v42.0/sobjects/Account" in every call to this route. Any pointers?
Thanks!
Hi @MarkBolden , I am getting a similar error from my request and I'm using a signed request in my POST call:
conn = new jsforce.Connection({signedRequest: sr}); conn.sobject('Account').create({ "Name":"Acc-001" }, (err, val)=>{ if(err){ res.send(There are errors >>> ${err}); } else { res.send(There is a success >>> ${val}); } });This is just a test route I used to debug, and can see: Error: Invalid URI "/services/data/v42.0/sobjects/Account" in every call to this route. Any pointers?
Thanks!
The login is asynchronous. You can to wait until the log in process is complete before you make the query.
I use await and then call a function to indicate readiness only once the login process is complete.
Most helpful comment
Nevermind.. I found the issue. My query was outside of conn.login.