Auth

Authenticate user on your platform

1. Redirect or load Iframe

We should redirect or load iframe (redirect is recommended) our user to:

https://wallet.wallettwo.com/auth/login?action=auth&redirect_uri=${callback_url}
  • action: Use 'auth' for this example. On interactions group you can find all what you can do.

  • redirect_uri: Url where user should be redirected to after success or error.

  • idp_id: If you want to automatically redirect user to an Identity Provider you can include this parameter on the url.

2. Process callback/event

After user has finished the auth process successfully or not he'll be redirected or event will be send containing the following information:

  • code: Token to be used

  • usr: User ID

  • wlt: Wallet Address of the user

3. Generate an access token

You need to get the access token using the following endpoint:

GET https://api.wallettwo.com/auth/consent?code={code}

It will return an access_token parameter if the code is correct

4. Get user info

With an access token you can access the user information on this endpoint:

GET https://api.wallettwo.com/auth/userinfo

Just make sure to include the following headers:

Authorization: Bearer {access_token}

Last updated