Skip to main content

Account setup

Setting up the account to use the API.

Setting up

Creating an account

To create an account, navigate to here.

Following the conclusion of the registration steps, take note of the username, password, subdomain and the affiliate id that is generated.

The username and password are used to generate an access token.

Screenshots of the process provided below:

Signup Part 1 Signup Part 2


Your username, password, and affiliate id are tied directly to your account.

It is highly recommended to use environment variables and a .gitignore when working with the API to prevent these sensitive credentials from becoming available in the public eye.

Getting an access token and refresh token

To recieve an access token and refresh token, the /auth route will be used.

The access token will have an expiration time of 15 minutes, however the refresh token will have a much longer expiration time.

The route will return an access token, token type, and refresh token.

Below are examples on using this route.

Curl example

curl --header "Content-Type: application/json" \ --request POST \ --data '{"user_name": "user1234", "password": "password1234"}' \

Python example

import requests
from os import getenv

username = getenv("username")
password = getenv("password")
body = {"username" : username, "password" : password}

url = getenv("bytefederal_api_url")

request ="{url}/auth", json=body)
response = request.json()

NodeJS example

async function Auth() {
const username = process.env.USERNAME;
const password = process.env.PASSWORD;
const bodyData = {
const url = `${process.env.BYTECONNECTURL}/auth`;
const request = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json"
const response = await request.json();

HTTP Codes


Returns a JSON encoded response of an access token, the token type, and the refresh token.


Username or password was invalid.