How to Obtain a Meroxa Access Token

By  Author not yet filled

 6 Sep 2021

The Meroxa access token is needed to authenticate to the Meroxa API programmatically. For example, the token allows you to build pipelines withTerraform.

To obtain a token, you must install theMeroxa CLI. Then, follow these steps:

  1. Log in to the CLI.
$ meroxa login
  1. Get token.

Themeroxa config command allows you access details about your Meroxa environment.

Meroxa Config Command

For security, the output is obfuscated unless you use the--json command:

$ meroxa config --json

Other Methods

If you're familiar withjq, in one command, you can parse the JSON output and only print the Meroxa token:

$ meroxa config --json | jq -r .config.access_token

You could also add this to your.zshrc or.profile to always have it available in your environment.

$ export MEROXA_REFRESH_TOKEN=$(meroxa config --json | jq -r .config.access_token)

     Meroxa