-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help needed for API endpoints #1274
Comments
API endpoints are documented here: https://www.ory.sh/docs/hydra/sdk/api |
Well, obviously I already read the API documentation page. I was looking for help because the response in not what one expects. The documentation about the /oauth2/token endpoint doesn't provide much information about that. |
|
I just spent an hour debugging this because I'm trying to put Hydra behind a proxy that is converting form parameters to json, would it be possible to update the api docs to point out that this endpoint only accepts form params? I understand that a client library should do this automatically, but it would be helpful to have that documented for people trying to debug like myself |
That's unfortunate! I also just noticed that the documentation is only showing the Accept/response header but not the request type. Reopening to track and fix this. However, a proxy that's doing such a conversion should probably not do that per default. I don't think that any documentation on this can help you debug such a network chain when one thing isn't doing what it's supposed to be doing. That doesn't imply that the docs shouldn't be improved though here! |
Thanks for the reply. I do agree that the proxy shouldn't be doing that and I'm going to open an issue on them as well (fastify-reply-from). In the meantime finding this issue finally helped me figure it out so I could override the proxy. The headers on that page would have definitely helped, so I appreciate that. |
Hm, I just checked, the swagger definition properly defines the consume/produce part:
Which is being translated to (swagger json):
So this might be an issue with the documentation template. |
This seems to be an upstream bug: Mermade/widdershins#216 |
Closes #1274 Signed-off-by: aeneasr <aeneas@ory.sh>
Closes #1274 Signed-off-by: aeneasr <aeneas@ory.sh>
Just want to add that, I faced the same issue, and for me, the problem was that I was sending the request with application/json as the request body type. It is not that. It has to be Here's a curl request which worked for me.
The client for this was set as
Note that you can set the credentials as basic auth header as well by setting For more info: refer to this page. |
Thanks @githugt , this is working. But where in docs is request params are mentioned of /oauth/token https://www.ory.sh/docs/hydra/reference/api#tag/oAuth2/operation/oauth2TokenExchange looks like this is not correct. |
Can you please help me to clarify what is the corresponding API endpoint of the following hydra command:
I'm following the 5 minutes tutorial but instead of using the cli I'm trying to create a client using postman, just to understand what are the corresponding endpoints and how to use them.
Hydra is running in the docker container.
Did a POST to /clients and the client was register correctly.
Then I want to perform the client credentials grant as stated in that tutorial.
I've tried using a POST to
/oauth2/token
with no luck.With this payload:
I get this responde:
I apologize if I'm doing things wrong, I'm trying to learn how oAuth2 works and eventually use hydra in the future.
thanks
The text was updated successfully, but these errors were encountered: