How to create developer Secret Access Key(SAK)
This article aims to provide an understanding of what SAK is, how to generate one, and its comparison with User JWT Tokens. Additionally, we'll explore the API endpoints that require the use of a SAK, focusing on actions within an NFT (Non-Fungible Token) ecosystem.
What’s SAK?
Secret Access Key (SAK) is a confidential piece of information used to authenticate and authorize developers' access to specific services, platforms, or APIs. It serves as a secure token that validates the identity of the developer and allows them to perform certain actions or retrieve data from the associated service. SAKs are particularly prevalent in scenarios where more robust access control is required beyond what standard API tokens or user credentials can offer. git
Getting Started
Before getting started, you want to make sure that you already have a Mirror World developer account and an already created project. If you're yet to create one, head over to https://app.mirrorworld.fun/auth/login to get started.
How to Generate SAK
- Navigate to your dashboard( https://app.mirrorworld.fun/dashboard ) and click on your profile at the top right corner.
- [] Click on Account settings on the dropdown menu.
-[] On the modal that pops up, click on the Add button.
-[] Lastly and also very important, copy the just created Access key because you won’t be able to see it once you close teh modal.
You can also modify the URL with custom data using any of the above parameters, for example, Let's say I want the initial fiat amount on the widget to be 500 then you can modify the URL to like this:
SAK vs User JWT Tokens
While both SAKs and User JWT Tokens are authentication mechanisms, they serve different purposes. SAKs are typically used by developers to access APIs and perform administrative tasks, making them suited for server-to-server interactions. On the other hand, User JWT Tokens are generated upon user authentication and are commonly used to authorize user-specific actions and data retrieval. The distinction lies in the scope and purpose of their usage.
API Endpoints that Requires SAK
There are several API endpoints that require SAK, below is a list of some of them
- Add collection to tracked collections
- Mint a new NFT Collection
- Update NFT on the collection
- Mint NFT on the collection
Edit this page on GitHub