Authentication

All API requests are secured and require an authorization before use. The credentials to generate an Oauth token can be accessed from your merchant account profile page.
There are two credentials available for use(Demo and Live). The demo service is a playground for development, to ensure your setup is working as expected.

How to Generate Access token

Demo url: sandbox.powershop.ng:8081/v1/merchant/auth/token/request

{
“username” : demo_username,
“secret” : demo_secret
}

Successful Response Payload

{
"access_token": "LlIm5eBMhGLdChL1L84sVp7LfWO29JXU18kEP0vH6dKCwaBrDUAz_
LkKQBAz54p8r96..G8Mb0MJnJfzfBXFffkq0B9Dym.Sg2NEKOYmkl8KICm9XqkES0s80
j9CLzJCwxPzlpnUKwVgWSwlJ5x6VaaTasGMbKU7L1Y6odImo9DTTr85jc_bMRul7ji_h1z
iYxTsaO2OSfFPaRYSL6W8Iegk5Ex_VK1
39oG4Whn0MUpttmXfIEELNsJD7th5yCd2"
,
"token_type": "Bearer",
"expires_in": 40000
}


Making An Authorized Request

To make an authorized request you must add a http request header

Key : Authorization
Value: Bearer access_token


Replace the access_token with the value obtained in from the authentication request.