用户登录

简要描述
  • 用户登录

如密码登录则无需code字段,如验证码登录则无需password字段

请求URL
  • /user/login
请求方式
  • POST
参数
参数名 必选 类型 说明
account String 账号(邮箱)
password String 密码
code String 验证码
返回示例
{
    "code": 0,
    "info": {
        "endpoint": "abcdefg.iot.us-west-2.amazonaws.com",
        "pool": {
            "identifier": "999999999999999999_13313133132_608109872549986304",
            "identityId": "us-west-2:**********************",
            "identityPoolId": "us-west-2:**************",
            "token": "eyJraWQiOiJ1cy13ZXN0LTIxIiwidHlwIjoiSldTIiwiYWxnIjoiUlM1MTIifQ.eyJzdWIiOiJ1cy13ZXN0LTI6NWU5YmRlYzYtZTgyMS00M2Y2LWI2YmQtNDA4ZjkyZjUwYmZiIiwiYXVkIjoidXMtd2VzdC0yOjRiOGMxNDNkLTcyOWYtNDI4MC1hZjdhLWQzMWMyOGMwNDdiMiIsImFtciI6WyJhdXRoZW50aWNhdGVkIiwiZ3JhbndpbiIsImdyYW53aW46dXMtd2VzdC0yOjRiOGMxNDNkLTcyOWYtNDI4MC1hZjdhLWQzMWMyOGMwNDdiMjo5OTk5OTk5OTk5OTk5OTk5OTlfMTMzMTMxMzMxMzJfNjA4MTA5ODcyNTQ5OTg2MzA0Il0sImlzcyI6Imh0dHBzOi8vY29nbml0by1pZGVudGl0eS5hbWF6b25hd3MuY29tIiwiaHR0cHM6Ly9jb2duaXRvLWlkZW50aXR5LmFtYXpvbmF3cy5jb20vaWRlbnRpdHktcG9vbC1hcm4iOiJhcm46YXdzOmNvZ25pdG8taWRlbnRpdHk6dXMtd2VzdC0yOjAwMTc5MTYxNDIyMzppZGVudGl0eXBvb2wvdXMtd2VzdC0yOjRiOGMxNDNkLTcyOWYtNDI4MC1hZjdhLWQzMWMyOGMwNDdiMiIsImV4cCI6MTYzNzMxNzQzOCwiaWF0IjoxNjM3MjMxMDM4fQ.erpU5KwVowsTXDeWp5Gqvtw0ZdSR-6Mc4t9IjuN3LdWWqdNz3eR8p-AF8bIORo_sgoWSODm3PXubPaxYga-ynlACD4spukw2dhYKUclIXTtcNllpCUknOobH0gikkxP8munObgrIq24z9jzUGm35pqkZnCWaJigRpP39-mWAWM7CeXfXOgNpW5biIQjX2fXrpLP-d4yKPO0wtDCz9tPM3wMzNlOdw2yqwKubWkfyIfeeqvLCRwcJNo5NI3LJX5iP6E09mGgxEi-pdmsySQrH7PtLDxTEKz860LJKiHA6E_JIKs38VIhMjMSAkeNTqsDT-6ka0SDI8J5BDcvACj0Ztg"
        },
        "refresh": "granwin_user_info_refresh_hash:_2592000_28a536f7-a36b-493e-a381-db7ac96cea16",
        "expiration": 7200,
        "granwin_token": "granwin_user_info_hash:_7200_57d845e6b2b6a84f2724b66f8edeb5a6",
        "proof": {
            "accessKeyId": "**********",
            "secretKey": "1M+******************/k0F41",
            "sessionToken": "IQoJb3JpZ2luX2VjEAMaCXVzLXdlc3QtMiJHMEUCIQDHkQJlFFK2Z/QIzjwRQfm2REHvl/NAmopOjLjIFRg5qwIgZeBy0x2i37dYDaUyYxiXr7bA0kluDSHJn5Py55hOkKQqmgQIvP//////////ARADGgwwMDE3OTE2MTQyMjMiDN1Te+lwbZl9G70SZCruA/WL6kVWl+9qFl3utqQcvQqTMi7U9RMWNrRZDAi4GDyfBwKQVfKz3pKU60P0+UlZqNe4ZUuvICKfO0C+Arf1CslgDJEXKajr0mYd4PqWAZtD5eC9pimyP8IFUTanUAjvuuzrRZwPXOaDipQXOlCu/T+YLgoqiqBLGEcYsisailFFLPJxeWzwdQKqz5O7VUfbTwHbAU0Zp6nNdrMbrykM5nmFvNZqY3HetlB6sqfNjrvDA8rKht0/mN6TbNYZ4oeIAKaetUo+15Q+GNkybTshLs1JROqrikxFKjgnKBk3qNQ+gzt2TWbCpobKs6VCe/GYX+e5QvP49Z8jWJ+/W0nuIfmX/ZGbBDR4r/12N9f2lJ21EKaA9qWDFbg6gnGkEh4jIFMa3ZedsG/0EtLLT6uVvM6kNv0hTQwS23/cjl4p17o7eIETwdlZmLMGVlVAv/regkYqoAJJzEPhH+BLwcmHBY49oH8ULqwV1gqzQkXdKmg7rwX84vVuIiV8U5+HfRVFfwrqfSMv4DIN/clc9LWjp07Ioz4fhGUdivxoxDadU6eUwZuAr9GgxQ6wKLuqxSXkRHsxjMBNuuq8P539Zp1fGZb8rJKYIVWomZzbIgBr9PUgWcrc/qU/BgukwmOA7LPJoHu5gM9v5aFiUK1uGWYQMMDT2IwGOoYCGSjOzcgYXLyOdg2CIMeLbGyKAYMokpWDqa6zcKCI7X1/eqeb8yqZgzil0d2XGO0mx+yNYRzPaJGLMIoqkS1bZzo8WAmZeCfKwn9+PRoOEwm0kQIt81xHca1XZ0Pf4kRv2+ml12XHSIKKMfMbB0vFh3q5N3IyfGmR0ZVq0k2KZhGNE+Abt6n6dlax0PadxC/Bs54DBKyOSfNIWoyu/cncU4CXYQBfsSj0O39P8j3sAavWE8Wx5McNWHPS/hSz22zH8mVEjLjRe/Am+A8jEHJkGGdToqpARIJjTafnxtDrI6udNIuVvMrbuNtMfpZLZ765DI4jhAkpSKbRW9OC8VzAAmsFan4vFw==",
            "sessionExpiration": 1637234640000
        },
        "region": "us-west-2",
        "account": "13313133132"
    },
    "tip": "响应成功"
}
返回参数说明
参数名 类型 说明
endpoint String iot平台节点
refresh String 平台刷新凭证密钥
expiration int granwin_token过期时间
granwin_token String 平台凭证
account String 账号
region String 节点
pool 用户身份信息
identifier String 用户身份
identityId String 用户身份Id
identityPoolId String 用户身份池标识
token String 用户身份凭证
endpoint String iot平台节点
proof 用户身份信息
accessKeyId String IOT临时账号凭证
secretKey String IOT临时密钥
sessionToken String IOT临时Token
sessionExpiration long 过期时间(时间戳)
备注
  • 更多返回错误代码请看首页的错误代码描述