Authorization
The API requires that you authenticate with a valid JWT bearer token in order to access the API.
You can create an account and get your token directly on our website (opens in a new tab).
Once you have a JWT bearer token, you can use it to authenticate with the API by including it in the Authorization header of every request. The following is an example of authenticating with the API:
cURL
curl --location --request GET 'https://api.artifactsmmo.com/my/characters?page=1&size=50' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ENTER_YOUR_TOKEN_HERE'
Javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer ENTER_YOUR_TOKEN_HERE");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.artifactsmmo.com/my/characters?page=1&size=50", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The API will return a 452 error if you attempt to access an endpoint without a valid JWT bearer token.
One common mistake is to forget to include the Bearer prefix in the Authorization header. For example, a proper Authorization header contains the value Bearer .