应用授权(第一步)

# API authorization (step 1) **Brief description**: - This document interface is only a part. Please contact customer service if you need more interfaces - First register an account, log in to the background, and create an application to obtain appkey and appsecret (https://easydoc.net/doc/22096149/qi0jrRg1/Jh6mapAq) - API service root address: APIURL: http://api.dcloud.starxlinker.com:8588/api/v1 - The function interface must be added with access token. Note that some interface documents are not written, and the authorization interface is applied for the first time. Other interfaces have this header parameter - Content-Type You also need to watch. Oh, there are plenty of them application/json, there are form data! **Request URL**: - {APIURL}/dy/login/login - APIURL:See background API information **Request mode** - POST **Request header Headers** - Content-Type:application/json **Parameter**: |Parameter name | Required | Type | Description |-|-|-|-| |app_key|is|string| Application key |app_secret|is|string| Apply secret **Return data**: |Parameter name | type | description| |-|-|-| |Code|int|0 success, -1 failure 1 prompt message| |Msg|string|feedback information| |data|string|Token value| **This interface can be called once, and the token authentication information will never expire**。 - After that, each request is set to the access token in the header - Access-Token: dcloud#eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDU1NDQzOTcsImlzcyI6IndlY2xvdWQiLCJhcHBfaWQiOiIxMzU5MTU0MjAyNzY4NTc2NTEyIn0.1p-nCu_Li7EZ1TxlOimx3PacFKYjbgZAtECRTGew **Request parameter example** ``` { "app_key": "a21f6f1e64e407de4de6a99d50ae2345", "app_secret": "b5286dd69c6f7cc665c7bda1048b9fc1f6aaba130179775c37d348121d3812" } ``` ``` { "code": 0, "data": "dcloud#eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDU1NDQzOTcsImlzcyI6IndlY2xvdWQiLCJhcHBfaWQiOiIxMzU5MTU0MjAyNzY4NTc2NTEyIn0.1p-nCu_Li7EZ1TxlOimx3PacFKYjbgZAtECRTGew", "msg": "api login success!" } ``` **Error return example** ```{ "msg": "Call failed", "code": -1, "data": null } ```