Manage Users API Key

Generate the first API key of a given user or update it.

Before you begin

⚠️

When updating an API key, the previous one is revoked.

Let's start πŸš€

Fetch user's ID

To retrieve all the users of your NFT Management Platform and their information, use /users.

πŸ’‘

The user's userId will allow you to generate or update the API key.

Result: Your users' information is returned.

[
    {
        "_id": "605c9a833ad5c229e7267bd",
        "profile": "admin",
        "email": "[email protected]",
        "userId": "QMQP2yTFcQaszbyUdGV4mJcKP",
        "deleted": false,
        "__v": 0,
        "auth0Id": "email|611a2dcad1ce9f9dc8",
        "apiKey": "...",
        "id": "605c9a833ad5c229e7267bd"
    },
    {
        "_id": "612f6a6bc9b767880ccd46",
        "email": "[email protected]",
        "profile": "admin",
        "userId": "email|612f6a6bd1ce9f9dc8",
        "auth0Id": "email|612f6a6bd1ce9f9dc8",
        "deleted": true,
        "__v": 0,
        "id": "612f6a6bc9b767880ccd46"
    },
    {
        "_id": "61375e88f103e0904b517",
        "email": "[email protected]",
        "profile": "admin",
        "userId": "423ce7d5-eb30-4b04-9d73-d4b4aed",
        "auth0Id": "email|61375e88d1ce9f9dc881",
        "deleted": true,
        "__v": 0,
        "id": "61375e88f103e0904b517"
    }
]

Generate or update API key

To generate or update a user's API key, use the /users/:userID/apiKey.

InputMandatoryTypeDescription
userIDβœ…StringIdentification of the NMP user's account.

Result:

httpCodeDescription
200The API Key is returned.
401Unauthorized: You may not have the required permissions.
500Your userID may be wrong or does not exist.
{
    "apiKey": "4fb34d26-e20f-47c8-9757-ab7ca68f3..."
}
{
    "message": "Unauthorized"
}
{
    "message": "User not found"
}