Get API Keys

All the API Keys are optional, and are only required by specific commands, that's mentioned in the specific sections. If you do not wish to use any of those commands (yet) you can skip that section or this entire section and can come back here later when you want those. When you get/receive an API key from any of the sections below, keep those keys/tokens/IDs in a file in your local computer where it's safe and easy to access. You are going to need these keys when you are configuring Bastion after the installation.

Battlefield API Key

Required by `battlefield1` and `battlefield4` commands.

Go to Battlefield Tracer Network Site.

Login/Register your account (Click Login/Register at the top right corner). After you've (registered and) logged in, click on Generate API key.

Fill up the given form with your name, email, website (you can also use https://bastionbot.org) and description. After that click on Generate API key.

Then you'll see your API Key under the Authentication section.

Battle.net API Key

Required by `wow` command.

Visit the Battle.net Developer Portal.

Login/Register your account (Click Login/Register at the top right corner). After you've (registered and) logged in, click on Get API Keys.

Fill in the form with your details. You don't need to worry about the callback URL, but make sure you select World of Warcraft in the franchises dropdown. The basic plan should be adequate. After that click on Register Application.

Then you'll see your API Key under the Keys section.

Bungie API Key

Required by `destiny2` command.

Go to Bungie Applications.

Login/Register your account. After you've (registered and) logged in, click on Create New App.

Fill up the given form with your name, website (you can also use https://bastionbot.org) and select the OAuth client type to Not Applicable.

Then if you agree to their Terms of Use, click on Create New App.

Then you'll see your API Key under the API Keys section.

Clash of Clans API key

Required by `coc` command.

Go to Clash of Clans API.

Login/Register your account.

After login choose My Account from the dropdown menu located top right corner.

Click Create New Key

Set name for the key, description is optional.

Allowed IP addresses requires the IP address of your Bastion bot. You can get your IP address for example from here. Make sure to use IPv4.

After that click Create Key and now you should have your API key.

Copy the key and add it into the credentials file.

Fortnite API Key

Required by `fortnite` command.

Go to Fortnite Tracer Network Site.

Login/Register your account (Click Login/Register at the top right corner). After you've (registered and) logged in, click on Generate API key.

Fill up the given form with your name, email, website (you can also use https://bastionbot.org) and description. After that click on Generate API key.

Then you'll see your API Key under the Authentication section.

Google API Key

Required by `maps` and `shorten` commands.

Go to the Google API Console.

Create a new project, name it anything you like. Once the project is created, click on Enable APIs.

Now, enable Google Static Maps API and URL Shortener API.

On the left tab, click Credentials. Then click Create Credentials button. Now click on API Key. A window will popup with your Google API key.

GitHub API Key

Required by `contributors` command. It would still work without it, but it's limited to 60 requests per hour.

Go to the GitHub Developer Settings > Personal Access Tokens.

Click on Generate new token.

Write Bastion Bot (or anything you like) in the Token Description.

In the Select scopes section, deselect everything. Bastion doesn't need to access any scopes, so it's better not to select any.

Then click on Generate token button at the bottom to generate your new token.

Copy the new token and keep it somewhere safe, as you won't be able to see it again for security reasons.

HiRez API Key

Required by `paladins` and `smite` commands.

Fill up the Hi-Rez Developer Credentials Application Form with correct details. Then submit it. After HiRez Studios have verified you, they will mail you with your HiRez DevId & AuthKey.

It generally takes few hours for them you mail you, so you can proceed with the installation, as you can add these to your `credentials.json` file anytime later.

IGDB API Key

Required by `game` command.

Visit the IGDB API Plans page.

Signup for the plan as per your requirements. The Free plan should be enough though.

After you've successfully signed up, you'll see your API Key in the credentials section of the page.

Musixmatch API Key

Required by `lyrics` command.

Visit Musixmatch Developer site and signup for a new accout (or signin if you already have one).

When all the signup steps are completed, you'll get your Musixmatch API key.

Patreon API Key

Required by `patrons` command.

Go to the Patreon Client Registration.

Click on the Create Client button.

Fill up the details as applicable, and click on the Create Client button at the bottom.

Now that your client is registered, you'll see the required credentials listed under your client.

PUBG API Key

Required by `pubg` command.

Go to PlayerUnknown's Battlegrounds Developer Portal.

Login/Register your account (Click MY APPS at the top right corner). After you've (registered and) logged in, click on Register a New App.

Fill up the given form with the asked details like your name, app's name (Bastion), website (you can also use https://bastionbot.org), description, etc.

After you've registered a new application, you'll get your API Key.

Rocket League API Key

Required by `rocketLeague` command.

Rocket League's API is currently in closed beta. So, you can't request an API key yet. Therefore, you can't use this command yet. Only a selected few have access their API. And Bastion is one of them, so the public Bastion bot can make use of the rocketLeague command. As soon as they allow public access to their API, you can request an API key and use the rocketLeague command in your self hosted Bastion.

The Movie DB API Key

Required by `movie` and `tvShow` commands.

Read The Movie Database FAQ to know how to get their API Key.

Twitch API Key

Required by `streamers` and `twitch` commands.

Read this article on How to get Twitch API Client ID & Client Secret.

Hey!👋Was this page helpful?

We're always looking to make our docs better, please let us know if you have any suggestions or advice about what's working and what's not!