First API Keys
Initial setup of API keys for a self-hosted instance.
This documentation is actively being improved. You may encounter gaps or incomplete sections as we refine and expand the content. We appreciate your understanding and welcome any feedback to help us make this resource even better!
Fonoster uses a Workspace-centric approach, meaning all operations are performed against a specific Workspace. By default, when you self-host Fonoster, it automatically creates a default Workspace along with a default username and password.
You must create API keys to log in to a Workspace and perform operations.
Create an API Key
Prepare the environment
First, create a new folder (e.g., fonoster-apikeys-demo) and navigate to it.
Install the SDK
Install the @fonoster/sdk
package.
Create the script
Once the installation is complete, create a new file called index.js
and add the following code:
Run the script
Finally, run the script.
If everything goes well, you should see the new API key printed to the console, and you can use it to log in to your Workspace.