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
chessbasechessbase 

LOGIN_MUST_USE_SECURITY_TOKEN Error

Hello All,
 
Can anyone tell me when was security token introduced in Apex API? I missed this news I guess hence someone reported login failure error.  
 
When I debugged the code I got LOGIN_MUST_USE_SECURITY_TOKEN error and I learnt that login process requires password + security token to do the succesfull login.
 
Thanks
SuperfellSuperfell
I don't have the exact date to hand, it was about 1 month ago.

the security token is only need for API logins from un-trusted IP addresses.
chessbasechessbase
Hi Simon,
 
Thanks for the reply. Can u tell me more about untrusted IP address? I have one account which works without the security token but another client account doesn't work without security token. How is that possible? Confused now.
 
Thanks again,
Amit Suri
SuperfellSuperfell
You can configure the list of trusted IPs in the app, under setup -> security
chessbasechessbase
Hi Simon,
 
I think you mean Setup -> Security Controls -> Network access....right? I have typed my machine IP address for start and end IP address but I still get the message if i do not pass security token to the login.
 
Am I missing something here?
 
Thanks again,
Amit Suri
SuperfellSuperfell
Does login history show the Same IP address, as what you think your IP address is ?
chessbasechessbase

Hi Simon,

Yes the login history IP address is in the IP address range i give in Network Access. Still it doesn't work, does it take some time to recognize the trusted IP address?

-Amit Suri

chessbasechessbase

Hi Simon,

Please ignore the last reply. I was overlooking the error description in the login history and the password was mistyped. Now it is working for me.

I appreciate your help,

Amit Suri