💳Authentication

SwitchWallet uses our authentication credentials to Identify who's making API calls

NB: For every API call, You be required to pass in either API Key Or Bearer Token to the request Header

SwitchWallet has two(2) methods of Authentication

  1. API Key

  2. Bearer's Token

API Key

This is gotten from the settings page of your dashboard, Click Here

Bearer Token

BaseUrl: You will have to change the value of the baseUrl below base on the Environment you want to interact with

Login

POST BaseUrl/api/v2/auth/login

Request Body

NameTypeDescription

email*

String

merchant-email-addess@mail.com

password*

String

Merchant-Pa$$word1

{
    "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InhlbmRmaW5hbmNlQGdtYWlsLmNvbSIsInN1YiI6ImI0M2UwNjcyLWI4MjItNDUwOS05ZmFlLTk0YTRlYThlMDU3ZiIsImp0aSI6IjM2M2I2N2YyLTgyODUtNDc4Ni04NDFkLTdmYzU0MmE3ZWZlOCIsImlhdCI6IjE2NzA1NjYwMzI1MTIuNDY1NiIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWVpZGVudGlmaWVyIjoiYjQzZTA2NzItYjgyMi00NTA5LTlmYWUtOTRhNGVhOGUwNTdmIiwiZXhwIjoxNjczMTU4MDMyLCJpc3MiOiJTd2l0Y2hXYWxsZXQiLCJhdWQiOiJTd2l0Y2hXYWxsZXRNZXJjaGFudHMifQ.J6pzMHsXew2qEuQXHK3vK52DX7aFxd434QulO4MG-3w",
    "refreshToken": "hbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9=-eyJlbWFpbCI",
    "expiresAtTimestamp": 1673158032512,
    "email": "Merchant-email-address@mail.com",
    "businessName": "Merchant"
  },
  "isSuccessful": true,
  "message": "",
  "httpStatusCode": 200 Response
}

NB: Bearer Token expires every 2 hours

Last updated