1.Access guide

Register, log in

  • Obtain call credentials

  • Implement business logic based on interface documents

  • Test introduction

  • Function online

    2.Obtain call credentialstoken

    The token is the globally unique interface call credential. The token has an expiration time. After expiration, you need to refresh the token or obtain new token. The method of obtaining the token is as follows:

    (1)Register and log in to the platform to obtain a third-party user’s unique credentials and credential keys, as shown in the figure:

    (2)Obtain interface credential token through ClientId and Client Secret:

    Token
    POST
    Oauth/token

    Description: The expiration time is 7200 seconds. Expiration: Generate a new token; Expiration time is not reached: the token and the remaining expiration seconds are returned.
    Request parameter:
    Type Required Remarks Example
    client_id string Y No1sX01PbbnLw
    client_secret string Y 2394fb0d9faa24b72902443831667d0d
    grant_type string Y client_credentials
    Request example:
    {
     "client_id": "No1sX01PbbnLw",
     "client_secret": "2394fb0d9faa24b72902443831667d0d",
     "grant_type": "client_credentials"
    }
    Return result:
    Parameter name Type Remarks Example
    code integer 0
    msg string success
    token string 93f3f23557c6c25d76bffead16c82aebbb3d77ee104b507e38919695897a2531
    expires_in integer 5224
    refresh_token string 9e5bb4dff226e4d656d3467ca4eb882fe3379d00d5cea77c35c5aabf79d8b56d
    Return example:
    {
     "code": 0,
     "msg": "success",
     "token": "93f3f23557c6c25d76bffead16c82aebbb3d77ee104b507e38919695897a2531",
     "expires_in": 5224,
     "refresh_token": "9e5bb4dff226e4d656d3467ca4eb882fe3379d00d5cea77c35c5aabf79d8b56d"
    }

    3.Refresh credentials

    Regenerate token
    POST
    Oauth/token

    Description: Before the token expires, regenerate the token
    Request parameter:
    Parameter name Type Required Remarks Example
    refresh_token string Y refresh_token 12943601459cc83edfadddc1d65d258b7f8c9adeadf10
    grant_type string Y Fixed value refresh_token refresh_token
    Request example:
    {
      "refresh_token": "12943601459cc83edfadddc1d65d258b7f8c9adeadf10",
      "grant_type": "refresh_token"
    }
    Return result:
    Parameter name Type Remarks Example
    access_token string Verify identity eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9
    expires_in int Seconds left 7200
    refresh_token string Before the token expires, regenerate the token 12943601459cc83edfadddc1d65d258b7f8c9adeadf10
    Return example:
    {
      "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
      "expires_in": "7200",
      "refresh_token": "12943601459cc83edfadddc1d65d258b7f8c9adeadf10"
    }

    4.Verification Specification

    Request method:
    GET、POST、PUT、PATCH、DELETE。
    Deliver content:
    The parameter key value and content are passed in json string format.
    Request Header:
    Parameter name Type Required Remarks Example
    Content-Type String Y application/json MIME Content Type.
    Authorization String Y Bearer <token> Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

    5.Sample code download

    Language version Update time Operation
    PHP v1.01 2019-08-16
    Java v1.01 2019-08-16
    Python v1.01 2019-08-16
    C# v1.01 2019-08-16

    6.Test introduction

    Test domain:
    http://api.demo.wareconn.com/

    You can use the test domain name for development testing