Hi all,
I'm able to use master realm for invoking the REST APIs but any other Realm
doesn't work.
I have checked the roles and other settings. But it is still not working.
curl -d "client_id=admin-cli" -d "username=admin" -d
"password=admin" -d
"grant_type=password" "
http://localhost:8080/auth/realms/master/protocol/openid-connect/token"
curl -H "Authorization: Bearer eyJh........MY3g" "
http://localhost:8080/auth/admin/realms/master/users"
above works
curl -d "client_id=admin-cli" -d "username=testuser1" -d
"password=testpass1" -d "grant_type=password" "
http://localhost:8080/auth/realms/testrealm/protocol/openid-connect/token...
curl -H "Authorization: Bearer eyJh........VIQz" "
http://localhost:8080/auth/admin/realms/testrealm/users"
but with testrealm, it doesn't work.
any input?
Regards,
SR
On Fri, Apr 27, 2018 at 8:14 AM, Sachin Rastogi <sr.misc(a)gmail.com> wrote:
Hi all,
I am trying to invoke Keycloak REST API (send-verify-email) from
https://www.keycloak.org/docs-api/3.4/rest-api/index.html on Windows
using CURL
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d
"client_id=admin-cli" -d "username=xxxxx" -d
"password=xxxxx" -d
"grant_type=password" "
http://localhost:8080/auth/realms/master/protocol/openid-connect/token"
I get the token from above request which I use in the following request as
follow:-
curl -X PUT -H "Authorization: bearer eyJhb......f2jYzaA"
http://localhost:8080/auth/admin/TestRealm/users/dummy1/send-verify-email
Neither the user (dummy1) get the verification email nor above request
return any response. Please advise what am I doing wrong here.
Regards,
SR