Getting Started
Welcome to the official Imperial Secrets API for Imperial's anonymous confessions page. The goal of this API is to provide you with secrets that have been posted so you can do cool stuff. For example, make a discord bot to post all secrets there.
To get API access, just contact the page, and we will set you up an account with a username and password.
How to use
Simply hit the https://imperial-secrets-bot-v2.herokuapp.com/api
endpoint with the correct auth header to get the most recent N submissions that have been posted to facebook.
The api uses HTTP Basic Authorization. This means you put your username and password in the header of the request as base 64.
We recommend using Postman to try out some requests, and use the Basic Auth
option in the Authorization
tab:
If you are too cool to use postman, then just make sure you have this header:
Authorization: Basic <username:password (but encoded as base 64)>
You can also add a limit query parameter to the request. The default is 10, the max is 200.
note
The server that hosts the API can go to sleep (since we are cheapskates that use free tier). Therefore, it sometimes might take around 30 seconds for the server to respond, so bear this in mind. Once the server is awake, it will respond to requests at normal speed until it goes to sleep again.
warning
There is a quota to the number of requests you can make to the server a day. Please design your bots efficiently so they don't get rate limited.
The shape of the data
The json data returned will be an array of objects that look like this:
Sample code
Here is some sample python to make the request: