Get Info
Grabbing all information affiliated with the user using an access token.
Security concerns
The access token carry many privileges within the API; be sure to keep them secure! Do not share your access token in publicly accessible areas such as Github, or client sided code.
Curl Example
curl --header "Content-Type: application/json" \ --request POST \ --data '{"access_token": "test_access_token"}' \ https://quinix.byteconnect.us/get_info
Python Example
import requests
from os import getenv
access_token = getenv("access_token")
body = {"access_token" : access_token}
url = getenv("bytefederal_api_url")
request = requests.post(f"{url}/get_info", json=body)
response = request.json()
The code will return:
{"affiliate_id" : 4, "subdomain" : "mochajoes", "logo" : "https://byteconnect.us/images/logo.jpg", "default_coin": "BTC"}
NodeJS example
async function GetInfo() {
const accessToken = process.env.ACCESSTOKEN
const bodyData = {
"access_token": accessToken
}
const url = `${process.env.BYTECONNECTURL}/get_info`;
const request = await fetch(url, {
method: "POST",
body=JSON,stringify(bodyData),
headers: {
"Content-Type": "application/json"
}
}
);
const response = await request.json();
console.log(response);
}
HTTP Codes
200
Returns a JSON encoded response of an affiliate id, subdomain, logo, and default coin.
401
Username or password was invalid.