function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JoyceJoyce 

Can you retrieve login history via API?

Hi,

A year ago, I know it wasn't possible to access the login history via the API.

With new releases is this possible now?

If not, is there any automated approach to get it daily?

THanks!

benjasikbenjasik
We haven't exposed this yet, sorry.
SF-NewBieSF-NewBie

Now that API is exposed I was trying that out and I am running into a problem related to Auth. I am using REST API as per instr given at http://www.salesforce.com/us/developer/docs/api_rest/index_Left.htm#StartTopic=Content/quickstart.ht...

 

I am able to do everything for the Account object as listed in there but when I try to access access LoginHistory object, it throws up an error that the resource does not exsist. I have given FULL scope for the connected app I created.

 

The command I am using is  curl https://na15.salesforce.com/services/data/v20.0/sobjects/LoginHistory -H 'Authorization: Bearer access_token' -H "X-PrettyPrint:1" with access_token replaced with the my own access_token/session id. I am getting the following response, 

 

{
"message" : "The requested resource does not exist",
"errorCode" : "NOT_FOUND"
}

 

Any input?