Hi, I am trying to get a token over the endpoint /auth/realms/{realm}/protocol/openid-connect/token
, but I only get:
Can someone help me please?
Hi, I am trying to get a token over the endpoint /auth/realms/{realm}/protocol/openid-connect/token
, but I only get:
Can someone help me please?
Hi,
Did you replace {realm} with the actual realm name?
Otherwise elaborate a bit further on your setup and attempts to make it work please.
Don
Hi @Don , thanks for your reply!
Oh yes I replaced {realm} with “master”. I posted the wrong screenshot … this is what I get:
The status is: 405 Method Not Allowed
Any idea how to fix this issue?
Is this an issue from my side or is it an issue of OpenRemote?
With the use of Postman it works now.
What I have done:
x-www-form-urlencoded
option and enter the following parameters:grant_type
: client_credentials
client_id
: {name-of-service-user}client_secret
: {generated-secret-of-service-user}For getting information about a specific asset I did the following:
Authorization
header to the request and set the value to Bearer {access_token}
, where {access_token}
is the access token obtained in the previous step.Hi Chief,
Great that you got it to work. Thanks for posting the steps you took!
Don
Thank you chief,
I stuck in this since long, but after getting your post it become so easy for me, one question, access-token expiring in 1 minute I think, how can we increase time?
Hi faraz, your welcome! Good question. I wrote a Python-script which automatically asks for a new token everytime it gets executed. But how you can change it in another way I do not know unfortunately.
@faraz003: do you fix 401 Unauth error? I meet similar issue like you do. Thanks
Please describe the steps you have tried in your case.
@deputy-chief-hardy gave a brief description on how it should work,
and it should be similar to oAuth2 standards. External use like Postman or use in your own application should use a Service user and the client_credentials grant as described.
Also feel free to open a new topic.
Maybe useful for you: Release: OpenRemote Postman API Collection with fix for OAuth Authentication
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.