Smart PMSGet Token for Login

Get Token for Login

Last Updated on : 2022-03-02 03:46:39download

This topic describes how to get a token for login.

Definitions

Method Version Description
v2.0/pms/production/login/token/get 2.0 Get token For login.

Flow chart

Get Token for Login

Request

  • HTTP type
    Post

  • Parameters

    Parameter Type Description Optional?
    username String The user name. No
  • Other parameters
    None.

Request example

{ "username" : "xxxxxx" }

Response

Name Type Description
result Map The result.
result.publicKey String The public key.
result.token String The token for login.
success Boolean Successful or not.

Response example

Successful response

{ "result" : { "publicKey" "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkJGH8******4yb0QIDAQAB", "token" : "f0494e89e576975058576bd76d352d34" }, "success": true }

Error response

{ "success": false, "code": "THE_BLANK_PARAM", "msg": "username cannot be null" }

Error code

Code Description
THE_BLANK_PARAM The parameter can not be empty.