Generate Access Token

Changed on

Generate unique token to have access to our services.

post/passport/oauth/token

Request

  • Base URL
    https://passport-sandbox.interswitchng.com
  • URL
    https://passport-sandbox.interswitchng.com/passport/oauth/token
  • Auth
    none required

Query parameters

grant_typestring

Headers

Authorizationstring required

Set value to "Basic Base64(CLIENT_ID:SECRET_KEY)"

Content-Typestring

Response

200

access_tokenstring
token_typestring
expires_ininteger
scopestring
merchant_codestring
production_payment_codestring
requestor_idstring
payable_idstring
jtistring

Example response

{
  "access_token": "eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2Flc2FyIiwiY2FyZGxlc3Mtc2VydmljZSIsImNyZWRpdC1zY29yZS1zZXJ2aWNlIiwiZGlyZWN0LXRvLWFjY291bnQiLCJpbmNvZ25pdG8iLCJpc3ctY29sbGVjdGlvbnMiLCJpc3ctY29yZSIsImlzdy1sZW5kaW5nLXNlcnZpY2UiLCJpc3ctcGF5bWVudGdhdGV3YXkiLCJwYXNzcG9ydCIsInBheW1lbnQtc2VydmljZSIsInBheW1lbnRzZXJ2aWNlIiwicHJvamVjdC14LWNvbnN1bWVyIiwicHJvamVjdC14LW1lcmNoYW50IiwicHdtIiwidmF1bHQiLCJ2b3VjaGVyLWFwaSIsIndhbGxldCJdLCJtZXJjaGFudF9jb2RlIjoiTVgxODciLCJwcm9kdWN0aW9uX3BheW1lbnRfY29kZSI6IjAwMTY0NjM5ODU0IiwicmVxdWVzdG9yX2lkIjoiMDAxMTc2MTQ5OTIiLCJzY29wZSI6WyJwcm9maWxlIl0sImV4cCI6MTYyNzYzOTU4NywianRpIjoiYTUzNTI0NjUtMzc1Yy00YmRiLWIwZmYtMDI1NDE1NjM5YmVjIiwicGF5YWJsZV9pZCI6IjIzMjQiLCJjbGllbnRfaWQiOiJJS0lBOTYxNEI4MjA2NEQ2MzJFOUI2NDE4REYzNThBNkE0QUVBODRENzIxOCIsInBheW1lbnRfY29kZSI6IjA0MjU5NDEzMDI0NiJ9.AqYq_5BMyVN49QWEqmoc6ZN7YXAdxK3WP4cijKLlTPcEmvzeDYUhZOu2J3-eMxEr1-46OGiMbCGQ2ezyz0oAfjeURpQ42-6P6eNXdXJrhYPGoALGsoz1Gwa66s6i8Lwq81n9PEkdQN8b6B0Gm-vQqWNl7OEWM2rZ8EotjlwbQn2vbMVlQPKvIXw--38IF-fdhq0VUbP6MKm9YVWxvcyEqhU6nAZnoEtG73U1aZSSA0bfjmAs0xmUCScURg9ufGCVn47J82UEkErUBJJTJg1SQ4bZkkWKJIDrd7S0-bUA_42cWb7y7PtwJYM4FJv94Ew_0ky9kv5dpv19ecgEfHvKCQ",
  "token_type": "bearer",
  "expires_in": 86400,
  "scope": "profile",
  "merchant_code": "MX18227",
  "production_payment_code": "00164639854",
  "requestor_id": "0055614992",
  "payable_id": "2324",
  "jti": "a5352465-375c-4bdb-b0ff-025415639bec"
}

Changes

    • breaking

      added the new required header request parameter Authorization

    • breaking

      removed the request body

    • breaking

      for the query request parameter grant_type, default value client_credentials was added

    • info

      api operation id generate-access-token was added

    • info

      the endpoint scheme security basicAuth was removed from the API

    • info

      api tag Auth removed

    • info

      added the new optional header request parameter Content-Type

    • info

      added the non-success response with the status