简体   繁体   中英

Fiware Keystone API Create User

We are trying to create users in Fiware IDM using Keystone Identity API.

We are sending the following curl command

curl -s \
 -H "X-Auth-Token: e746971040657101bb1e" \
 -H "Content-Type: application/json" \
 -d '{"user": {"name": "newuser", "password": "changeme"}}' \
 http://localhost:35357/v3/users | python -mjson.tool

The token we have used is the one configured in keystone.conf

admin_token=e746971040657101bb1e

But the result we are getting is the following

{
    "error": {
        "code": 401, 
        "message": "The request you have made requires authentication.", 
        "title": "Unauthorized"
    }
}

Does anyone have an idea about what can happen?

A couple of ideas for you.

One is that the port value 35357 is not for the admin API calls, it's intended for user calls.

Also since you are using the v3 API I believe that the token can't be used when creating a user unless you are indicating a domain.

However I can't tell from your curl command what action you are trying to do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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