Skip to main content

How to Obtain a Meroxa Access Token

· One min read
@anaptfox
Developer Advocate

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

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

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

The meroxa 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 with jq, 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)