
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
sf-get-token
Advanced tools
Retrieve an access token for Salesforce so you can test the REST APIs with curl.
To test the Salesforce REST API, you need an access token. However it is not easy to get an access token, so I've created a simple utility to get this token. This displays the access token and a sample shell command that you can use for testing the REST API with curl.
$ npm install -g sf-get-token
$ sf-get-token
Salesforce user: me@rts.com
Password with security token:abcdjdjd
Access Token:
00D30000001HJhu!AQ4AQANmid1HmydWO7vGnO0HgMKBr_NekVAnToG1id5Wr7AG3Kz3ebYNgrKaiO1.gwc48U7xomKVPQ1vAJGRZqFV87VZkhsO
export ACCESS_TOKEN='00D30000001HJhu!AQ4AQANmid1HmydWO7vGnO0HgMKBr_NekVAnToG1id5Wr7AG3Kz3eGENgrKaiO1.gwc48U7xomKVPQ1vAJTFZqFV87VZkhsO'
export ACCESS_HEADER="Authorization: Bearer $ACCESS_TOKEN"
curl https://na9.salesforce.com/services/data/v35.0/sobjects -H "$ACCESS_HEADER" -H "X-PrettyPrint:1"
If you have set the environment variables SF_USER
and SF_PASSWD_WITH_TOKEN
; just hit enter and it will use those values.
If you redirect the output to a file, it will save the example curl commands to that file. You can edit this file to test the Salesforce REST APIs.
$ sf-get-token > test.sh
Salesforce user:
Using environment variable SF_USER
Password with security token:
Using environment variable SF_PASSWD_WITH_TOKEN
Access Token:
00D30000001HJhu!AQ4AQANmid1HmydWO7vGnO0HgMKBr_NekVAnToG1id5Wr7AG3Kz3ebYNgrKaiO1.gwc48U7xomKVPQ1vAJGRZqFV87VZkhsO
FAQs
Retrieve an access token for Salesforce so you can test the REST APIs with curl.
The npm package sf-get-token receives a total of 5 weekly downloads. As such, sf-get-token popularity was classified as not popular.
We found that sf-get-token demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.