org login access-token

Authorize an org using an existing Salesforce access token.

Description for org login access-token 

By default, the command runs interactively and asks you for the access token. If you previously authorized the org, the command prompts whether you want to overwrite the local file. Specify –no-prompt to not be prompted.

If you pipe the access token to the command (so stdin isn’t an interactive terminal), the command reads the token from stdin and doesn’t prompt to overwrite an existing file.

To use the command in a CI/CD script, set the SF_ACCESS_TOKEN environment variable to the access token. Then run the command with the –no-prompt parameter.

Aliases for org login access-token 

force:auth:accesstoken:store

auth:accesstoken:store

Flags 

Flag Name (Long)Flag Name (Short)Description
‑‑alias‑aType: Value

Alias for the org.
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑instance‑url‑rType: Value
Required

URL of the instance that the org lives on.

If you specify an –instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.

To specify a My Domain URL, use the format “https://<MyDomainName>.my.salesforce.com”.

To specify a sandbox, set –instance-url to “https://<MyDomainName>–<SandboxName>.sandbox.my.salesforce.com”.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑no‑prompt‑pType: Boolean

Don’t prompt for confirmation.
‑‑set‑default‑sType: Boolean

Set the authenticated org as the default that all org-related commands run against.
‑‑set‑default‑dev‑hub‑dType: Boolean

Set the authenticated org as the default Dev Hub.

Examples for org login access-token 

Authorize an org on https://mycompany.my.salesforce.com; the command prompts you for the access token:

1sf org login access-token --instance-url https://mycompany.my.salesforce.com

Authorize the org without being prompted; you must have previously set the SF_ACCESS_TOKEN environment variable to the access token:

1sf org login access-token --instance-url https://dev-hub.my.salesforce.com --no-prompt