通过 API 从 Allegro.pl 获取按类别 ID 列出的产品/优惠列表

问题描述 投票:0回答:1

我无法按类别 ID 从 allegro API 获取产品(报价)列表。

我获得令牌并在使用承载连接后进行连接。

'Authorization' => 'Bearer '.$token,

获取类别及其 ID。

之后我致电 https://api.allegro.pl/offers/listing

$response   = $client->request( 'GET', 'https://api.allegro.pl/offers/listing', [
                    'headers' => [
                        'Authorization' => 'Bearer '.$token,
                        'Content-Type' => 'application/vnd.allegro.public.v1+json'
                    ],
                ] );

但是我有这个错误:

异常:客户端错误:`GET https://api.allegro.pl/offers/listing` 导致

403 Forbidden\
响应:{"errors":[{"code":"VerificationRequired","message" :“访问被拒绝。需要验证。”,“详细信息”:null,“路径”:(截断...)

有人可以帮忙吗?

rest allegro allegro-pl
1个回答
0
投票

从 2021 年 3 月 15 日起,您需要拥有经过验证的应用程序才能使用该资源。您可以在这里阅读更多信息:https://github.com/allegro/allegro-api/issues/4213

© www.soinside.com 2019 - 2024. All rights reserved.