force-rest-api icon indicating copy to clipboard operation
force-rest-api copied to clipboard

Missing instance_url and id in ApiSession

Open xgp opened this issue 7 years ago • 2 comments

According to https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm the instance_url and id are returned when a request is made for an access token in exchange for an authorization code (your Auth.completeOAuthWebServerFlow method that returns an ApiSession). Is it possible to add those fields to ApiSession? Would you accept a PR that does this? Thanks!

xgp avatar Sep 26 '18 20:09 xgp

https://github.com/jesperfj/force-rest-api/pull/71

xgp avatar Sep 26 '18 21:09 xgp

instance_url is available in ApiSession.getApiEndpoint(). id is not currently available but I believe it's just a pointer to the same resource as what you get with ForceApi.getIdentity(). Can you confirm?

jesperfj avatar Mar 19 '21 08:03 jesperfj