Ask Your Question
0

Curl to request to get tokens returns Unauthorized error

asked 2013-11-25 05:37:08 -0500

anonymous user

Anonymous

updated 2013-11-25 11:14:28 -0500

dheeru gravatar image

Hi

I'm trying below given API to connect horizon.

curl -k -X 'POST' -v http://103.247.97.1:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "xyz", "password":"abc"}, "tenantId":"1"}}' -H 'Content-type: application/json'

but getting error :

  • About to connect() to 103.247.97.1 port 5000 (#0)
  • Trying 103.247.97.1... connected
  • Connected to 103.247.97.1 (103.247.97.1) port 5000 (#0) > POST /v2.0/tokens HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: 103.247.97.1:5000 > Accept: / > Content-type: application/json > Content-Length: 124 > < HTTP/1.1 401 Unauthorized < Vary: X-Auth-Token < Content-Type: application/json < Content-Length: 114 < Date: Mon, 25 Nov 2013 11:31:40 GMT <
  • Connection #0 to host 103.247.97.1 left intact
  • Closing connection #0 {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

Please help me out.

Thanks

Harish

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-11-25 10:21:58 -0500

dheeru gravatar image

updated 2013-11-25 10:22:48 -0500

Can you send me send me the output of following.

  1. keystone user-list
  2. keystone tenant-list
  3. keystone role-list
  4. keystone token-get

Also give the exact curl command you are typing on the command line.

Based on this I will suggest you.

edit flag offensive delete link more

Comments

This issue is resolved ?

dheeru gravatar imagedheeru ( 2013-11-27 04:44:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-11-25 05:37:08 -0500

Seen: 1,074 times

Last updated: Nov 25 '13