Access tokens are unique strings of characters that authenticate a user’s identity and provide secure access to Salesforce APIs. In this article, we will discuss how to obtain an access token using SFDX CLI.
Steps to Get Access Token
- Authorize an org: To use SFDX CLI to get an access token, you first need to authorize an org. Use the following command to authorize an org:
|
|
This command will open a web browser window, where you will be prompted to log in to your Salesforce account. Once you have logged in, your org is authorized, and you can use it to get an access token.
- Get Access Token: To get an access token for the authorized org, use the following command:
|
|
This command will display the access token for the authorized org.
Cheers! 🍺