magento 中的oauth/initiate 需要配置哪些文件?

认证第一步,会报这个错,什么鬼?

正确的访问的方法应该是POST,你直接GET访问,肯定会有问题。建议多看文档。
https://doc.magentochina.org/guides/m1x/api/rest/authentication/oauth_authentication.html#OAuthAuthentication-UsingOAuth

需要先进入Magento配置访问的密钥

##Registering an Application
Before starting to make API requests, you need to register the application. After the registration, you will receive the Consumer Key that will identify you in Magento. Also, you will receive a Consumer Secret. This secret will be used when requesting for a Request Token.

You can register your application by selecting System > Web Services > REST - OAuth Consumers and clicking Add New in the Admin Panel.

When registering the application, you also need to define the callback URL, to which the user will be redirected after he/she successfully authorizes your application.

##Authentication Endpoints
The authentication endpoints include the following ones:

  • /oauth/initiate - this endpoint is used for retrieving the Request Token.
  • /oauth/authorize - this endpoint is used for user authorization (Customer).
  • /admin/oauth_authorize - this endpoint is used for user authorization (Admin).
  • /oauth/token - this endpoint is used for retrieving the Access Token.
    Also, the simple form can be used for authentication. To use a simple form, add the /simple endpoint to the authentication endpoint. For example: /oauth/authorize/simple