How to Get Authorization Data
First, you need to know How to Get Authorization Data. This is one of the most important things responsible for logging the user into the Blockchain. Authorization capabilities will be required for integrating the MetaPro Wallet and also for executing certain API queries or displaying user-specific information.
Ethers package installation
In order to authorize, it is required to generate the signature. It can be achieved by using an ethers package.
Then validate if, in the package.json file, dependency is added
Generate signature
To generate the signature, please implement the following function
Take note that the message should remain unchanged, only walletAddress and hash should vary. Take a hash from the response of the following endpoint:
Authorize
Use our /users-service/auth/login endpoint to generate an access token
In response, you will receive an access token that can be used in the other endpoints as an Authorization header.
Last updated