[尝试获取令牌时伪造身份验证失败:错误404

问题描述 投票:0回答:1

我正在尝试为我的伪造应用程序创建一个两足式身份验证令牌,但由于得知资源不存在,我无法获得任何人。当我在VS 2019的开发人员命令提示符中运行此行时:

`curl -v "https://developer.api.autodesk.com/authentication/v1/authenticate"-X "POST"-H "Content-Type:application/x-www-form-urlencoded"-d "client_id=cRQTUv3rwWcqF00qn57W8ANNUIkV0wPo&client_secret=<edited-out>&grant_type=client_credentials&scope=data:read"`

我收到以下消息:

`< HTTP/1.1 404 Not Found
< Date: Fri, 17 Apr 2020 13:30:41 GMT
< Content-Type: application/json
< Content-Length: 205
< Connection: keep-alive
< Access-Control-Allow-Origin:
< Access-Control-Allow-Methods: POST,GET,OPTIONS,HEAD,PUT,DELETE,PATCH
< Access-Control-Allow-Headers: Content-Length,x-ads-ul-ctx-client-id,x-ads-ul-ctx-caller-span- 
id,Content-Range,Access-Control-Allow-Origin,Authorization,x-ads-test,x-ads-ul-ctx-oxygen-id,x-ads- 
acm-scopes,x-ads-ul-ctx-head-span-id,If-Match,x-ads-ul-ctx-source,Accept-Encoding,If-Modified- 
Since,x-ads-acm-namespace,Access-Control-Allow-Credentials,x-ads-acm-groups,Session-Id,Content- 
Encoding,x-ads-ul-ctx-scope,Range,Accept,x-ads-ul-ctx-workflow-id,x-requested-with,Expect,x-ads-acm- 
check-groups,If-None-Match,Content-Type,x-csrf-token
< Access-Control-Allow-Credentials: true
< Strict-Transport-Security: max-age=31536000; includeSubDomains
<
{ "developerMessage":"The requested resource does not exist.", "moreInfo": 
"https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/", "errorCode": 
"org.mozilla.javascript.Undefined@0"}* Connection #0 to host developer.api.autodesk.com left intact`

我已经没有想法了。我首先关注的是Autodesk教程https://forge.autodesk.com/en/docs/oauth/v2/tutorials/get-2-legged-token/

autodesk-forge bearer-token
1个回答
0
投票

curl命令似乎格式错误。所有不同的参数都应该用空格隔开,例如:

curl -v "https://developer.api.autodesk.com/authentication/v1/authenticate" -X "POST" -H "Content-Type:application/x-www-form-urlencoded" -d "client_id=cRQTUv3rwWcqF00qn57W8ANNUIkV0wPo&client_secret=<your-app-secret>&grant_type=client_credentials&scope=data:read"

此外,不要共享您的客户端应用程序密码。返回https://forge.autodesk.com/myapps下的Forge应用,并生成一个新的客户端密码,以便没有人可以使用您在此处粘贴的密码。

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.