You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the steps to create an application in salesforce and added the client key and secret in oauthd dashboard . I am making an get access token call, which gives me a access token and refresh token.
Now I want to make rest api calls to salesforce using oauthd request apis. I am referring this document
[http://docs.oauth.io/#using-rest] to implement the rest api calls by providing the app key secret in parameter ' k ' and accesstoken as follows.
my oauthd server is configured as http://localhost:6284
this is the uri which I use to make rest api calls http://localhost:6284/request/salesforce/services/data/v36.0/query/?q=SELECT Id, Name FROM Account WHERE AccountNumber = 'CE414794'
and these are the parameters which I pass
oauthio : k=_KEY&access_token=_token
The call fails with response as { "status": "error", "code": 500, "message": "too few args to sprintf", "data": { "code": "InternalError", "stack": [ "InternalError: too few args to sprintf", " at Server.<anonymous> (/usr/local/lib/node_modules/oauthd/node_modules/restify/lib/index.js:111:18)", " at emitMany (events.js:108:13)", " at Server.emit (events.js:182:7)", " at Domain.onError (/usr/local/lib/node_modules/oauthd/node_modules/restify/lib/server.js:792:18)", " at emitOne (events.js:77:13)", " at Domain.emit (events.js:169:7)", " at emitError (domain.js:65:24)", " at Domain.errorHandler [as _errorHandler] (domain.js:104:16)", " at process._fatalException (node.js:220:33)" ] } }
But when I make a direct call to salesforce without oauthd ( i use the same access token which I get from the oauthd server) , I get a success response and the user details . What might be the issue. Are these rest api's available for oauthd or is it not. If yes why do I get the above error, or the way in which we are making rest api calls incorrect.
The text was updated successfully, but these errors were encountered:
I followed the steps to create an application in salesforce and added the client key and secret in oauthd dashboard . I am making an get access token call, which gives me a access token and refresh token.
Now I want to make rest api calls to salesforce using oauthd request apis. I am referring this document
[http://docs.oauth.io/#using-rest] to implement the rest api calls by providing the app key secret in parameter ' k ' and accesstoken as follows.
my oauthd server is configured as http://localhost:6284
this is the uri which I use to make rest api calls
http://localhost:6284/request/salesforce/services/data/v36.0/query/?q=SELECT Id, Name FROM Account WHERE AccountNumber = 'CE414794'
and these are the parameters which I pass
oauthio : k=_KEY&access_token=_token
The call fails with response as
{ "status": "error", "code": 500, "message": "too few args to sprintf", "data": { "code": "InternalError", "stack": [ "InternalError: too few args to sprintf", " at Server.<anonymous> (/usr/local/lib/node_modules/oauthd/node_modules/restify/lib/index.js:111:18)", " at emitMany (events.js:108:13)", " at Server.emit (events.js:182:7)", " at Domain.onError (/usr/local/lib/node_modules/oauthd/node_modules/restify/lib/server.js:792:18)", " at emitOne (events.js:77:13)", " at Domain.emit (events.js:169:7)", " at emitError (domain.js:65:24)", " at Domain.errorHandler [as _errorHandler] (domain.js:104:16)", " at process._fatalException (node.js:220:33)" ] } }
But when I make a direct call to salesforce without oauthd ( i use the same access token which I get from the oauthd server) , I get a success response and the user details . What might be the issue. Are these rest api's available for oauthd or is it not. If yes why do I get the above error, or the way in which we are making rest api calls incorrect.
The text was updated successfully, but these errors were encountered: