精易论坛
标题:
ebay开发者平台问题
[打印本页]
作者:
A1392747874
时间:
2024-11-13 14:50
标题:
ebay开发者平台问题
https://developer.ebay.com/marketplace-account-deletion
@app.get
(
"/ebay_callback"
)
async def
ebay_callback
(challenge_code:
str
):
print
(challenge_code)
ENDPOINT_URL =
'https://f15a-124-156-211-76.ngrok-free.app/ebay_callback'
if not
challenge_code:
raise
HTTPException(
status_code
=
400
,
detail
=
"Challenge code is required"
)
challenge_string =
f"
{
challenge_code
}{
SECRET_TOKEN
}{
ENDPOINT_URL
}
"
print
(challenge_string)
hash_object = hashlib.sha256(challenge_string.encode())
challenge_response = hash_object.hexdigest()
print
(challenge_response)
response_content = {
"challengeResponse"
: challenge_response
}
return
JSONResponse(
content
=response_content,
media_type
=
"application/json"
)
if
__name__ ==
"__main__"
:
uvicorn.run(app,
host
=
"0.0.0.0"
,
port
=
7777
)
成功接受也返回去了为什么就是验证失败
补充内容 (2024-11-13 14:50):
INFO: Uvicorn running on http://0.0.0.0:7777 (Press CTRL+C to quit)
a7ceebe41dd78f32001b7f05aed99495e4d26fac3a6494284a46a962b051bade
a7ceebe41dd78f32001b7f05aed99495e4d26fac3a6494284a46a962b051...
欢迎光临 精易论坛 (https://125.confly.eu.org/)
Powered by Discuz! X3.4