-
-
Notifications
You must be signed in to change notification settings - Fork 1
Applications and API
When an application is set up in Hasheous, you can manage your apps API keys, as well as provide data about your app such as screenshots, links, etc. This data forms a catalog entry for your app so that visitors to the Hasheous site can lookup apps that use the API and database.
Currently the only way to create an app is to post in the Discord #hasheous-server channel (https://discord.gg/Nhu7wpT3k4). An admin will create an empty app for you and grant you access to it.
A self service form is in development.
Customising the app is as easy as going to your app and clicking Edit and then filling in the form. Here you can add links, screenshots, and set the name and logo, as well as configure who can modify the app entry.
Users who are to be delegated permission to modify the app must already have a Hasheous account. Entering their registered email address and clicking Save will grant them full control over the app.
While the lookup endpoints have no access requirement to use, some endpoints like the MetadataProxy require an API key.
On the main app page, you can create and manage API keys.
Enter a name for your key, and select the expiration date (or never) and click Create.
The key will be created and displayed only once.
Note that there is no restriction on the name of the key.
Keys cannot be deleted, but they can be revoked which will prevent them from being used again.
Simply click on the key you wish to revoke and enter "REVOKE" in the pop up. Revoked keys cannot be re-activated, so ensure you're revoking the correct key.
When connecting to the API, only some endpoints require an app API key, while others require a user API key. The user API key is unique to each user and can be found by going to the Account menu and selecting Account.
The user API key is used for endpoints that require users to be identified such as the submissions endpoints.
| Endpoint | Required Key | App API Key Accepted |
|---|---|---|
| Lookups | No key required | Yes |
| MetadataProxy | App API key required | Yes |
| Submissions | User API key required | Yes |
To send the app API key, add a request header called X-Client-API-Key to your request.
Note: If you haven't opted out of Insights, it is best practice to send this key with all requests to ensure that requests from your app are properly attributed.
To send the user API key, add a request header called X-API-Key to your request.
Note: This key is only used for user endpoints, and is not required for other endpoints - though it will still be recorded with the event to Insights.