【发布时间】:2019-02-01 13:03:34
【问题描述】:
我正在尝试探索产品 api 以使用 curl 命令创建 api。 我按照文档创建了访问令牌。在那之前它工作得很好 但是当我尝试使用以下命令调用发布者服务时,出现错误
curl -v -k -H "Authorization: Bearer <access token obtained>" http://<host ip address>:9763/api/am/store/v0.14/apis
* About to connect() to <host ip address> port 9763 (#0)
* Trying <host ip address>...
* Connected to <host ip address> (<host ip address>) port 9763 (#0)
> GET /api/am/store/v0.14/apis HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <host ip address>:9763
> Accept: */*
> Authorization: Bearer <access token obtained>
>
< HTTP/1.1 401 Unauthorized
< Date: Thu, 31 Jan 2019 15:03:08 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Server: WSO2 Carbon Server
<
* Connection #0 to host <host ip address> left intact
{"code":401,"message":"","description":"Unauthenticated request","moreInfo":"","error":[]}
I have rechecked my login credentials while generating the client key and then the client and client key while generating the token. I am not sure what is going wrong. Can anyone help
【问题讨论】: