Get an Access Token

There are two ways to get an access token.

  • You can interactively sign in to the Acrolinx Core Platform from within the CLI and authorize your application.
  • You can get an access token by logging into the Acrolinx Dashboard.

Get an Access Token By Interactively Signing In 

To interactively sign in the Acrolinx Core Platform, follow these steps:

  1. In a command shell, enter the following command

    acrolinx-cli signin --acrolinx-url <ACROLINX_URL> --open

    If you've already set your Acrolinx URL in an environment variable, you can just enter acrolinx-cli signin --open.

    The output should resemble the following example:

    Please sign in using the following Acrolinx URL:
    https://company.acrolinx.cloud/signin/integration/8a3f0f1e-749c-492f-bf24-90ba7f09de8a/confirm

    Because the --open parameter is included, the CLI automatically opens the URL for you in a browser window. 

  2. In the window that appears, sign in to the Acrolinx Core Platform.
    After you sign in, you should see a window with the title "An Application Wants to Access Your Acrolinx Account".

  3. In the next window that appears, click CONFIRM, and return to the CLI.

    The output should resemble the following example:

    You can optionally use the following token to sign in:
    
    eyJ0eXAiAiOiJKV1QOiJKV1QiLCJ...0tupYAiOiJKV1QdqwmRG5ugs_nWzfeMtAiOiJKV1QozCM...
    
    You're signed in as "acrolinx-bot".
    
    
  4. (optional) Test your token by running a check with the following command.

    acrolinx-cli check --acrolinx-url=<ACROLINX_PLATFORM_URL> --access-token=<ACCESS_TOKEN> --files="<FILE_PATH>"

    Your command should look something like this:

    acrolinx-cli check --acrolinx-url=https://topspin.acrolinx.cloud  --access-token=eyJ0eXAiAiOiJKV1QOiJKV1QiLCJ...0tupYAiOiJKV1QdqwmRG5ugs_nWzfeMtAiOiJKV1QozCM... -files="README.md"


    Once you have your access token, it's better to set it as an environment variable.

Interactive Sign-in Within a Build System

If you want to authenticate your test build system, you can easily assign the output of the signin command to an environment variable like this

ACROLINX_ACCESS_TOKEN=$(acrolinx-cli signin)

The Acrolinx URL is omitted from this example because we assume that you have already set it as an environment variable. The build process will pause while you sign in and authorize the application on your development computer. Once you've authorized the CLI, your build process resumes.


Get an Access Token by Logging into the Acrolinx Dashboard.

You can also get an access token for your own user account or another user account by logging into the Acrolinx Dashboard.

  • For more information on getting an access token this way, see the article "Create an API Token" in the Core Platform documentation.