3

When I register an application in WSO2 API store, I am allowed to check most of the grant types except the following grant types: - Code and - Implicit

How can turn ON the code grant type ?

Community
  • 1
  • 1
bhalochele
  • 227
  • 3
  • 11

1 Answers1

2

You should provide a Callback URL (as shown in below image) to generate tokens with code and implicit grant types. After providing a callback URL, click on Generate Keys button.

enter image description here

Bee
  • 12,251
  • 11
  • 46
  • 73
  • I had the callback url. My invocation looks like the following curl -X GET --header 'Content-Type: application/x-www-form-urlencoded' 'https://127.0.0.1:8243/authorize?response_type=code&client_id=3Pgte6Wh3yismuz1nu7SMTxG1m8a&scope=PRODUCTION&redirect_uri=https://localhost.com' -v -k and it returned with the following: HTTP/1.1 302 Found < X-Frame-Options: DENY < X-Content-Type-Options: nosniff < X-XSS-Protection: 1; mode=block < Location: https://127.0.0.1:9443/authenticationendpoint/oauth2_error.do?oauthErrorCode=unsupported_grant_type&oauthErrorMsg=Requested+Grant+type+is+not+supported. – bhalochele Nov 01 '16 at 13:13
  • In the WSO2 API store, under the application, all grant types are checked, but the "code" grant type is unselected. Not sure, if that is causing the issue of unsupported grant type ? – bhalochele Nov 01 '16 at 13:17
  • looks like you have misunderstood my answer. So I attached a screenshot. – Bee Nov 01 '16 at 14:29
  • I now have updated the callback URL. However, when I try to invoke the endpoint to get the authorisation code like in the link below, I don't receive a url in the response with query param ?code= . I have attached a screen shot to my original question. – bhalochele Nov 01 '16 at 20:37
  • I don't think it's a good idea to update questions with different questions after an answer is given. The problem is when someone else reads the question and answer, they will be confused. So I suggest you to remove your new question from this, and create a separate question. – Bee Nov 02 '16 at 04:29
  • Advise well taken! – bhalochele Nov 02 '16 at 07:57