Authentication
Authentication Methods
Web2: need to provide
userId
andmembershipId.
Web3: need to provide
publicAddress
andChain.
membershipId
, smartContract Address
and Chain
needs to be set up in the business portal for authentication to be successful.
Getting Access Token
Endpoint: https://sandbox.chainrewardz.net/auth/v3/login
To integrate Chainrewardz and perform functions for your users, you must call our API to obtain the user's accessToken
. This token is required for all functions performed on Chainrewardz. If the user does not exist in our system, a new user will be created based on the userId
or publicAddress
you provide.
Example Request
Specify whether you are integrating using the Web2 or Web3 method in the request method.
For Web2 Integration: You need to specify the userId
(a unique identifier in your system) and membershipId
(the membership level defined in your Chainrewardz business portal).
For Web3 Integration: You need to specify the publicAddress
and the Chain
. See our prerequisites section for more information.
Example Response
Upon receiving the request, our system will return an accessToken
and a refreshToken
.
Last updated