代码改变世界

在salesforce中如何获取Security Token

2020-05-04 20:31  假面Wilson  阅读(821)  评论(0编辑  收藏  举报

Trailhead练习Soap API使用Soap UI时,需要Security Token才能登录,在Lightning一直找不到,后来切换到Classic才找到。现在提供一个简单粗暴的方式,快速定位到重置Token的位置:“https://[SalesforceDomainHere]/_ui/system/security/ResetApiTokenEdit?retURL=%2Fui%2Fsetup%2FSetup%3Fsetupid%3DPersonalInfo&setupid=ResetApiToken”

在网上找了一篇关于What is security token的博客,写的很精彩:http://www.cloudsuccess.com/blog/what-is-the-salesforce-security-token/

大致讲了以下几点内容:

1、what is the security token?

2、what does the security token do?

3、how do I use my security token?

4、how to reset a security token?

补充:

1、使用Sublime Text开发(下载/上传Code)Salesforce应用程序时,针对Sandbox环境即通过test.salesforce.com登录进来的,security_token并不是必需的;但针对Production环境即通过login.salesforce.com进来的,下载/上传Code,需要security_token;
2、经比较在试用版本的DE Production环境在设置里面有“重置设置我的安全标志”,而在企业级开发的正式环境并不可见;
3、很多时候试用工具访问salesforce时密码部分并不是单纯的密码,还需要拼接security_token;
4、在使用SoapUI时候,trailhead中提到一点:
Since you’re making an API request from an IP address unknown to Salesforce, you need to append your security token to the end of your password.
由此可知,如果我们将user所在的profile的IP地址范围设置为0.0.0.0 - 255.255.255.255就不需要考虑token了。