Platform

Connect your command line interface to your Back4App account

Introduction

Account Keys are personal access tokens that can be used to create a new Back4App app as well as list properties and keys for the given app.

You may set up the command line interface to use account keys to perform many actions like creating a new app or fetching master key for an app when required (for example, when performing deploy, fetching logs, etc.).

At any time, you can access the complete Back4App CLI Project our GitHub repository.

You can choose not to set up your keys, but then you will be prompted to enter email and password for each operation done with CLI involving your app.

Get your Account Key

To obtain your account key, log in to your account at Back4App Website and hover the Hello, < username > button in the top right, then click on Account Keys:

There you can find existing keys or create a new one.

Existing Keys

If there is an account key saved, you will see a page like the one below:

The corresponding key is the string available in the Key property below:

No keys

If you don’t have one yet, fill the Account Key Name text input, then click on the + button:

Now, click on the green box toSAVE:

The corresponding key is the string available in the Key property below:

Set up your key

You need to execute the following command to set up the account key in your computer:

You can also obtain an account key by pressing enter when prompted in the command below.

$ b4a configure accountkey
Input your account key or press ENTER to generate a new one.
NOTE: on pressing ENTER we’ll try to open the url:
"http://dashboard.back4app.com/classic#/wizard/account-key"
in default browser.
Account key:

This command will only work for the first time you do this setup in a specific computer. Otherwise, you should run b4a configure accountkey -d to overwrite your old key with a new one.

The account keys you set up are stored in ${HOME}/.back4app/netrc for Mac and Linux and in C:\Users\yourName\.back4app\netrc for Windows.