RedemptionC commented on issue #2011:
URL: 
https://github.com/apache/apisix-dashboard/issues/2011#issuecomment-891004434


   > @RedemptionC Please make sure you write the log in the correct location 
and restart the Manager API.
   
   Ok I found that it's due to that I mixed admin API with manager API:in the 
command I posted,when creating a consumer,I used admin API(port:9080),while 
manager API is on port 9000
   And it seems the doc of manager api is not complete?(@juzhiyuan,could you 
give some context?)it only shows API on query
   I don't get it why this command(to create a consumer using manager API) can 
not succeed:
   ```
   ❯ curl "http://127.0.0.1:9000/apisix/admin/consumers"; -H "X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1" -H "Authorization: $(curl -s  
localhost:9000/apisix/admin/user/login -X POST -d '{"usern    
ame":"admin","password":"admin"}'  | jq -r '.data | .token')"  -X PUT -d '
   {
     "username": "test",
     "plugins": {
       "key-auth": {
         "key": "key-of-john"
       }
     }
   }'
   {"code":4107,"message":"request unauthorized","data":null,"request_id":""}%  
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to