在 Python 中有什么替代方案?
curl -X POST \
-H 'accept: application/json' \
-H 'content-type: application/x-www-form-urlencoded' \
'https://api.mercadolibre.com/oauth/token' \
-d 'grant_type=client_credentials' \
-d 'client_id=CLIENT_ID' \
-d 'client_secret=CLIENT_SECRET'
JSON 响应是这样的:
Status code: 200 OK
{
"access_token": "TU_ACCESS_TOKEN",
"token_type": "bearer",
"expires_in": 10800,
"scope": "...",
"refresh_token": "REFRESH_TOKEN"
}
有人知道我怎样才能获得 access_token 吗?不是整个 JSON,我只需要 access_token。
谢谢
最佳答案
似乎有一个 Python library对于 MercadoLibre,它为您包装了所有这些。
关于python - Python 或 Django 中的 CURL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25037759/