--- title: JWT token login description: GET /account/tokenLogin.do: JWT token login interface description, including path, method, parameters and return information. slug: api-get-account-tokenlogin-do lang: en category: Messages And Login API category_order: 8 order: 158 api_method: GET api_path: /account/tokenLogin.do api_label: JWT token login keywords: - API - JWT token login - /account/tokenLogin.do --- # JWT token login | Properties | Values | | --- | --- | | HTTP methods | `GET` | | Interface path | `/account/tokenLogin.do` | | Category | Message and Login API | ## Interface description Interface path: `/account/tokenLogin.do` HTTP method: `GET` Section: PDF page 29 userToken=xxxxxxxxxxxxxxxx defaultClrTheme=dark defaultLang=en disableUserMark=1 Construction of userToken userToken is an encrypted string containing logged-in user information. The encrypted information is a password created by JWT, a standard security mechanism for transmitting trusted data between two parties. The content of JWT encrypted user information JSONObject is as follows: { payload: { email: “xxx@xxx.com”/“135XXXXXXX”/“XXXX”} time: now } Note: email can be an email address, mobile phone number, or work number; The code is as follows: public static void main( String[] args ) { HashMap user = new HashMap(); user.put("email", "yuanchaozhao@qq.com"); try { //token login String userToken = createTokenJWT(user); System.out.println("----> login token:" + userToken); JSONObject parsed = parseTokenJWT(userToken); System.out.println("-----> parsed:" + parsed); System.out.println("-----> Just put this token as a parameter in the url, such as: "); System.out.println("/account/tokenLogin.do?userToken=" + userToken); } catch (Exception e) { System.out.println(e.getMessage()); } } For other codes, please refer to the jwtToken generation code, which is provided in the authentication interface 2. Remarks: JWT is the abbreviation of JSON Web Tokens. It is a communication encryption and decryption mechanism that meets the industry standard RFC7519. Please refer to: https://jwt.io/ ## Call instructions - Before calling, you need to complete [Get token](api-post-api-token-do.md) or the corresponding login-free authentication, and carry `Authorization: Bearer ` in the request header. - If there are differences in parameters and return fields due to deployment versions, the actual private cloud API documents and joint debugging results should prevail. - Category: Message and Login API.