gpt4 book ai didi

Python - API 参数帐户工具包中提供的 appsecret_proof 无效

转载 作者:太空宇宙 更新时间:2023-11-03 15:54:38 27 4
gpt4 key购买 nike

在 Facebook 文档中,他们提到 access_token 包含以下内容

AA|facebook_app_id|app_secret

https://developers.facebook.com/docs/accountkit/graphapi

appsecret_proof 是使用应用程序 secret 作为 key 的访问 token 的哈希

appsecret_proof = hmac.new((app_secret).encode('ascii'), msg=access_token.encode('ascii'),digestmod=hashlib.sha256).hexdigest()

所以我使用上面生成的 appsecret_proof 来调用端点

https://graph.accountkit.com/v1.1/me/?access_token=

以 appsecret_proof 作为第二个参数。但我仍然收到 API 参数中提供的 Invalid AppSecret_proof

最佳答案

根据文档,您需要使用用户访问 token 并将其与应用程序 key 进行哈希处理,以获取应用程序的 Secret_proof 而不是应用程序访问 token

关于Python - API 参数帐户工具包中提供的 appsecret_proof 无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40912809/

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