WSPN
Language
  • English
Version
  • V1.0
HomeWallet
Language
  • English
Version
  • V1.0
HomeWallet
Twitter
Telegram
Linkedin
  1. Authentication
  • Introduction
  • Get Started
  • Signature
  • What is WUSD
  • Webhook Service
  • Sandbox Environment
  • Blockchain Confirmations
  • Appendix
  • API Keys
  • Core Functionality
    • Core Functionality
    • Quickstart: Deposit via Blockchain Wallet
    • Quickstart: Withdraw via Blockchain Wallet
    • Quickstart: Deposit via Funds Transfer
    • Quickstart: Withdraw to Bank
  • Api Reference
    • Authentication
      • Get Access Token
        POST
      • Refresh Access Token
        POST
    • Wallet
      • Address
        • Get Deposit Address
        • Add Whitelist Address
        • Get Whitelist Address
        • Delete Whitelist Address
      • Remit Info
        • Get Deposit Remit Info
        • Add Remit Info
        • Edit Remit Info
        • Get Remit Info
        • Delete Remit Info
      • Transaction
        • Get Balance
        • Create Fiat Deposit
        • Create Fiat Withdraw
        • Create Crypto Withdraw
        • Get Fiat Transaction
        • Get Exchange Rate
        • Create Mint/Redeem
        • Mint/Redeem History
        • Get Mint Redeem Receipt
        • Get Fiat Transaction Receipt
        • Get Crypto Transaction Receipt
  1. Authentication

Get Access Token

Developing
POST
/openapi/v1/auth/oauth2/token
To use OAuth 2.0, please use Fetch Access Token first.
Add Authorization: Bearer {access_token} in the other API requests.
ParamDescriptionFixed Value
Content-TypeThe Content-Type should be multipart/form-data.multipart/form-data
api_keyThe API Key value fetched from Before Integration.
api_secretThe API Secret value fetched from Before Integration.
grant_typeFixed value client_credentials.client_credentials

Request

Query Params
grant_type
string 
required
Fixed value client_credentials.
Example:
{{grant_type}}
api_key
string 
required
The API Key value fetched from Before Integration.
Example:
{{api_key}}
api_secret
string 
required
The API Secret value fetched from Before Integration.
Example:
{{api_secret}}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://wallet.test.wspn.io/openapi/v1/auth/oauth2/token?grant_type=&api_key=&api_secret='

Responses

🟢200成功
application/json
Body
access_token
string 
required
For API calls, keep safely in your system. Any leakage will cause potential security risk. Please
expires_in
number 
required
The Access Token expiry time, in seconds.
refresh_token
string 
required
To fetch a new access token before these two tokens are expired.
rt_expires_in
number 
required
The Refresh Token will expiry, in seconds.
token_type
string 
required
Fixed value bearer.
Example
{
  "header": {
    "success": true
  },
  "result": {
    "access_token": "Cji8NYO32ugrFJJkG7uCYiX2",
    "token_type": "bearer",
    "expires_in": 21600,
    "refresh_token": "C6k8Vqytb4S8x41RUdMNqzG1",
    "rt_expires_in": 43200
  }
}
Previous
Quickstart: Withdraw to Bank
Next
Refresh Access Token
Built with