twitter - Twitter OAuth 1.0 "215 Bad Authentication Data" error when requesting token
问题描述
My use case is 3-legged auth for my current business to get some impression data from Twitter. This stuff was a breeze on LinkedIn but I'm falling at the first hurdle with Twitter, having followed docs & videos I'm still running into a "Bad Authentication Data" error when getting an access token.
I've snipped the callback, consumer key and token, but the consumer key is the API key from my Twitter app and the token is the Access Token from the same. Below is the json. none, signature and timestamp I got auto generated by postman. Any pointers?
{
"name": "get_access_token",
"properties": {
"activities": [
{
"name": "Web1",
"type": "WebActivity",
"dependsOn": [],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"url": "https://api.twitter.com/oauth/request_token",
"method": "GET",
"headers": {
"OAuth": "oauth_nonce=\"wErUbiAbmCi\", oauth_callback=\"https%3A%2F%2F<snipped>\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1613748394\", oauth_consumer_key=\"<snipped>", oauth_signature=\"hMnZtN5hT5KHRcyrxz8xis33C1c=\", oauth_version=\"1.0\", oauth_token = \"<snipped>\""
}
}
}
],
"annotations": []
}
}
解决方案
The OAuth headers need to be sorted alphabetically. The documentation is here.
推荐阅读
- swift - 如何知道 SwiftUI 中的语言是否从右到左?
- python - 准确了解数据框中的哪些行导致运行时警告
- python - 如何不允许在 DynamoDB 上删除特定项目?
- c++ - 未找到 QML 模块 (QtCharts)
- python-3.x - 无法让我的 matplotlib 文本在 pick_event 上刷新
- spring - Spring Mongo Query 不起作用 -> readName 只能在 State 为 NAME 时调用,不能在 State 为 VALUE 时调用
- apache-kafka - Kafka流反序列化异常| 记录并继续
- javascript - AWS Lambda:对 Node 运行时使用异步处理函数有什么好处?
- hadoop - MapReduce - Reducer 没有收到Combiner 的记录是否有原因?
- ssh - Ansible:在剧本中动态设置主机 SSH 端口