是只有企业用户才可以调用吗,查了好像需要认证
云开发调用物流轨迹,报错怎么处理?晕开发调用物流轨迹{"errCode":48001,"errMsg":"openapi.logistics.getPath:fail api unauthorized hints: [MJKAHHXFe-hann4a!]"},这是什么意思,怎么处理,谢谢, inde.js // 云函数入口文件 const cloud = require('wx-server-sdk') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { const wxContext = cloud.getWXContext() try { const result = await cloud.openapi.logistics.getPath({ openid: event.openid, orderId: event.orderId, deliveryId: event.deliveryId, waybillId: event.waybillId, }) console.log(result) return result } catch (err) { console.log(err) return err } return { event, openid: wxContext.OPENID, appid: wxContext.APPID, unionid: wxContext.UNIONID, } } config.json { "permissions": { "openapi": [ "logistics.getPath" ] } } package.json { "name": "wuliu", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "wx-server-sdk": "latest" } }
2020-02-22