I understand.
I was looking for something to simulate the register page action. So users
can register themselves without being authenticated.
An Admin CLI will be useful for me. That's a great news!
Thanks for your help!
2016-12-01 8:18 GMT-03:00 Marko Strukelj <mstrukel(a)redhat.com>:
Your URL doesn't look right. It should be more like:
http://localhost:8080/auth/admin/realms/servlet-authz/users
<
http://localhost:8080/admin/realms/servlet-authz/users>
But then if you want to do this from shell via curl you need to first
obtain authentication token. For example, take a look at:
http://lists.jboss.org/pipermail/keycloak-user/2016-July/006793.html
There is Admin CLI coming soon that will simplify this a lot.
On Wed, Nov 30, 2016 at 5:28 PM, Celso Agra <celso.agra(a)gmail.com> wrote:
> Hi all,
>
> I'm configuring keycloak to perform some actions with rest api. I'm trying
> to create an user using the register action (like register page), but when
> I call the rest api:
>
> curl -H "Accept: application/json" -H
"Content-Type:application/json" -X
> > POST -d "{'username' : 'bburke', 'enabled': true,
'email' : '
> > bburke(a)redhat.com', 'firstName': 'Bill', 'lastName':
'Burke',
> > 'credentials' : [{ 'type' : 'password', 'value'
: 'password' } ],
> > 'realmRoles': [ 'user', 'offline_access' ],
'clientRoles': {'account':
> [
> > 'manage-account' ] } }"
> >
http://localhost:8080/admin/realms/servlet-authz/users
>
>
> I got an 404 error. Would be possible to create an user just using the
> rest
> API?
>
> Thank you.
>
> best regards,
>
> Celso Agra.
> _______________________________________________
> keycloak-user mailing list
> keycloak-user(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-user
>