gpt4 book ai didi

api - 错误 401 未经授权连接 Marvel API

转载 作者:行者123 更新时间:2023-12-04 01:42:36 24 4
gpt4 key购买 nike

我创建了一个新帐户来使用 Marvel API,但是调用它时遇到了一些麻烦。

I've generated a hash based on these parameters:


timestamp: 1561464418685
public key: 3e6f6a484529014f288cc251191b85d0
private key: 0e70d6990a8135b5409ede2cbab3a9e913c6b9c3

So I've concatenated the parameters into a single string like this:


15614644186850e70d6990a8135b5409ede2cbab3a9e913c6b9c33e6f6a484529014f288cc251191b85 d0

and then applied MD5 hash, returning the following hash:


57d62328aea6fb144458312efbdf7989

and finally, the complete call:


https://gateway.marvel.com/v1/public/characters?ts=1561464418685&apikey=3e6f6a484529014f288cc251191b85d0&hash=57d62328aea6fb144458312efbdf7989

但我得到的唯一返回如下:
{"code":"InvalidCredentials","message":"This user is not allowed to use that service."}

我正在尝试在浏览器(Chrome)和 postman 上发出请求。

这是我在 Marvel Developer Panel 上的帐户配置的打印件,似乎我的用户实际上并没有被允许调用 API,因为没有显示 os API 调用的数量。

任何提示都会非常有用。

非常感谢!

最佳答案

好吧,即使这是一个迟到的答案:如果您是从本地主机开发,则需要在 developer.marvel.com 的 myDeveloperAccount 中的“您的授权推荐人”中添加:

一个冒号的 IP 地址,
添加引用者,另一个是本地主机(带星号)

偶然发现

关于api - 错误 401 未经授权连接 Marvel API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56755603/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com