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)

Replicate data from PostgreSQL to Redshift

· 4 min read

In this guide, we are going to create a real-time data pipeline to sync data from PostgreSQL to Redshift using Meroxa. This pipeline will keep a table within Redshift up-to-date with every insert, update, and delete operation from PostgreSQL.

Postgres to Redshift

How to Expose PostgreSQL Remotely Using ngrok

· 2 min read

In this guide, we will walk through exposing a local PostgreSQL instance with ngrok. This method allows you to quickly test and analyze the behavior of PostgreSQL with data platforms like Meroxa.

Add Local PG

For this example, we are going to use ngrok. ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels.