If possible, always include your User-Agent
header with a small description of your project and perhaps a way of contacting the author,
or a code link on Github, or anything to describe the project that uses the API.
This extra info makes debugging, error hunting and making statistics a lot easier. 🙂
In order to access endpoints with required authorization, you must provide your user id/name and your API authorization key.
- Head over to the Get API key section on the website
- Log in, if not logged in already
- Generate your key! Make sure to save both your user ID and the key together
When making a request, in your headers, include the following authorization header structure:
Authorization: Basic (user-id):(api-key)
Sample fetch
request:
await fetch("https://supinic.com/api/test/auth", {
headers: {
Authorization: "Basic 12345:abcde"
}
});
When making any request, along with any other params, include these two:
auth_user
- your user IDauth_key
- your API key
Sample fetch
request:
await fetch("https://supinic.com/api/test/auth?auth_user=12345&auth_key=abcde");