cancel
Showing results for 
Search instead for 
Did you mean: 

Requesting an Access Token with an Authorization Code dont give me a token

Emilio_Moreno
Champ in-the-making
Champ in-the-making

hi, i have a problem with the OAuth 2 when i used the rest api just like the document first a create a new entry in the oauth2Clients directory, for instance with curl using this:

curl -u Administrator:Administrator \ -H 'Content-Type: application/json' \ -X POST http://NUXEO_SERVER/nuxeo/api/v1/directory/oauth2Clients \ -d @- << EOF { "entity-type": "directoryEntry", "directoryName": "oauth2Clients", "properties": { "name": "My App", "clientId": "myApp", "clientSecret": "secret", "redirectURIs": "https://myapp.mydomain.com/nuxeo-auth-done", "autoGrant": "true", "enabled": "true" } } EOF

when i used the get in CURL authorization endpoint GET https://NUXEO_SERVER/nuxeo/oauth2/authorize?response_type=code&client_id=myApp the GET return nothing but... when i used intere link in my browser works fine and in the url give a like &code=KEDsdlodk (is a random code) when i used the code in the ### Requesting an Access Token with an Authorization Code and put de curl with: POST https://NUXEO_SERVER/nuxeo/oauth2/token?grant_type=authorization_code&client_id=myApp&code=authoriza... return me invalid authorization code; error: invalid_grant im doing something wrong? check the images in the post pls, if anyone know about this let me know and thanks for the help

Sorry for my english is a little bad :c

0 REPLIES 0
Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.