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

Refresh Access Token

Developing
POST
/openapi/v1/auth/oauth2/token
API to Refresh Token for Authentication.
If the access token expired, you can re-fetch it or use the Fetch Access Token by Refresh Token API. Or you can get a new access token before it expired.
Only one access token can be exists in the same time per client-id, we suggest cache the access token in your caching system, for example, Redis.
ParamDescriptionFixed Value
Content-TypeThe Content-Type should be multipart/form-data.multipart/form-data
refresh_tokenFrome the Get Access Token Api
grant_typeFixed value refresh_token.refresh_token

Request

Query Params
refresh_token
string 
required
The refresh_token value fetched from the previous step.
Example:
CpCAhcCRtLU4kPjs54omWW3A
grant_type
string 
required
Fixed value refresh_token.
Example:
refresh_token

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 --request POST 'https://wallet.test.wspn.io/openapi/v1/auth/oauth2/token?refresh_token=CpCAhcCRtLU4kPjs54omWW3A&grant_type=refresh_token'

Responses

🟢200成功
application/json
Body
access_token
string 
required
A new Access Token will be generated.
expires_in
number 
required
The Access Token expiry time, in seconds.
refresh_token
string 
required
A new Refresh Token will be generated.
rt_expires_in
number 
required
The Refresh Token will expiry, in seconds.
token_type
string 
required
Fixed value bearer.
Example
{
  "access_token": "CkppLkyiqEUKITGdtCZRUZBl",
  "expires_in": 21600,
  "refresh_token": "CpCAhcCRtLU4kPjs54omWW3A",
  "rt_expires_in": 43200,
  "token_type": "bearer"
}
Previous
Get Access Token
Next
Get Deposit Address
Built with