does sugar log failed api requests for tokens?

Does Sugar log failed requests for API tokens?

I'd like to see if there were any token requests that failed the authentication step.

thank you,

Francesca

Parents Reply Children
  • Hi Francesca,

    The s:11 is the separator, after that you'll have the number of times that the login failed: 

    I am afraid there is no way to know when it failed. However, this parameter is set to "0" when you change the password, so it is safe to assume that it shows the failed logins since the last password change. 

    You can test this with your user with the endpoint:

    GET: http://<sugarurl>/rest/v11/me/preferences

    You can also get this value via code for any user like this: 

    $failedlogins=$user->getPreference('loginfailed');

    I can't find an out-of-the-box endpoint to retrieve preferences for other users, but you could create a custom one should you need it. 
    I hope this helps.