简体   繁体   English

Magento OAuth请求未使用管理员角色

[英]Magento oauth request isnt using Admin role

I'm developing an api to connect a site to a new magento store using oauth. 我正在开发一个API,以使用oauth将网站连接到新的magento商店。

I'm authenticating using the admin/oauth_authorize route and I've managed to get an access token and secret key to request for resources, but it's not working. 我正在使用admin/oauth_authorize路由进行身份验证,并且设法获取了访问令牌和密钥以请求资源,但是它不起作用。

I get 我懂了

Invalid auth/bad request (got a 403, expected HTTP/1.1 20X or a redirect)

when I try to use the token. 当我尝试使用令牌时。

I checked the user roles and it's set to a rest admin role I made. 我检查了用户角色,并将其设置为我创建的其他管理员角色。 I also checked the user apps and it does register that I gave authorization. 我还检查了用户应用程序,它确实注册了我授权的程序。

Right now I'm testing with api/rest/products while setting access and secret keys that I received after authorizing. 现在,我正在对api/rest/products进行测试,同时设置了获得授权后收到的访问权限和秘密密钥。

Is there something I might be missing or could someone point me out to some useful magento oauth roles usage information? 我是否可能缺少某些东西,或者有人可以向我指出一些有用的magento oauth角色使用信息?

I'm using php oauth to make the requests. 我正在使用php oauth发出请求。

Btw, if i give access to Guest it does return product information, just in case. 顺便说一句,如果我授予对Guest的访问权限,它的确会返回产品信息,以防万一。

事实证明,当我尝试获取数据时,我缺少正确的oauth构造,我只需要添加正确的auth类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM