magento - Magento 2 Rest API 从会话令牌(React Native App)中获取客户 ID
问题描述
我正在开发一个 React Native 应用程序,我在 API 文件或文档中看不到如何在他们登录应用程序或任何其他客户信息后从会话令牌中检索客户 ID。
解决方案
我能够YOUR_HOST.com/rest/V1/customers/me
用标题定位这个端点:
{
"Content-Type": "application/json",
Authorization: "Bearer adkfvllaskYOUR_SESSION_TOKENasdfasf"
}
推荐阅读
- java - Java 控制台在 Eclipse 中闪烁和出错
- python - 使用openpyxl python在excel中插入带有空白的公式
- r - 如何将来自剪影()的矩阵输出转换为r中的数据框
- python - 为多个边界框调整 tensorflow 对象检测
- google-cloud-functions - Android 设备未收到 Firebase 云消息推送通知
- windows - 无法访问 dockerized、不安全 Nifi 的 UI:发生意外错误
- kubernetes - 以 root 用户身份运行 Openshift pod
- c - cs50 拼字游戏
- html - 带引导程序的可触发辅助导航栏
- webpack - 在 dontet core razorpages 项目中捆绑 javascript 的最佳方式