使用 Shopware 6 REST API 在没有用户密码的情况下获取有关客户的信息

Get information about customer without password of user using the Shopware 6 REST API

我正在尝试使用 Shopware 6 的 REST API 获取有关客户的信息(使用此 API). Therefor I need a ContextToken for that user. The only way to get a context token for a user is to log him in,但为此我需要一个我没有的用户的密码。有什么方法可以只用他的电子邮件地址或历史客户 ID 来获取用户的 ContextToken 吗?

Shopware 带有 2 个不同的 API,Store-API 和 Admin-API。参考docs.

Store-API 用于构建店面,因此您需要作为使用该 API 的用户进行身份验证。

构建自定义集成时,您应该使用 Admin-API,因为 API 可用于系统所有实体的 CRUD-like 操作。对于管理员 API 你可以生成一个 API-Token 并用它来查询所有客户的数据。