WSO2 - OAuth2/token is throwing the 405 error












1















As part of project learning, I m trying to access WSO2 API Manager. I downloaded the WSO2-AM-2.5.0. As my PC is already equipped with java. I havent installed.
I started services with "bin/wso2server.bat".



Once it is started i am trying to access carbon and logged in with admin/admin credentials. Once i am logged in i created Tenant in configure module and created tenant successfully.



Once Tenant is created. I jumped into store URL and logged in with the selected Tenant credentials and created an application with that Tenant. Once Application is created. I tried to generate Client Id and Secret key.
I copied those details, i have API https://localhost:9443/oauth1/token for generating Access_Token. But unfortunately didnt worked with Windows 10 (64Bit) and Linux Ubuntu 16.04 version.



Please guide me where i m doing wrong with this approach.
enter image description here



enter image description here










share|improve this question

























  • Do you see any errors in wso2carbon.log? I guess you are getting this error when you hit the generate keys button in the application.

    – Pubci
    Nov 20 '18 at 19:11











  • @Ayyappa: Please show us a screenshot of the request you're sending. Also, please use this url to generate tokens. https://localhost:8243/token

    – Bee
    Nov 21 '18 at 4:02











  • @Bee Please find the attached screenshots of my tests. i tried with http then thrown SSL error and kept https back and tried. still no use.

    – Ayyappa A
    Nov 21 '18 at 5:31











  • I'm a bit confused. Your explanation says the URL has oauth1 in it, and the screenshot shows it has oauth2 in it. But in the error response I can see the correct URL as https://localhost:8243/token. Which one is the correct one? Question 2: please confirm you didn't change any files in repository/deployment directory.

    – Bee
    Nov 21 '18 at 9:14











  • Oauth1 is typo mistake.oauth2/token is copied from /carbon. You please tell me which one is correct and yes i didnt change anything in the directory. Finally with CURL i can test the localhost:8243/token with grant_type=client_credentials. and it given me the {"access_token":"4b10af9c-3bd2-37a3-a691-f40a303ae641","scope":"am_application_scope default","token_type":"Bearer","expires_in":3600}. using git bash not with postman.

    – Ayyappa A
    Nov 22 '18 at 4:31
















1















As part of project learning, I m trying to access WSO2 API Manager. I downloaded the WSO2-AM-2.5.0. As my PC is already equipped with java. I havent installed.
I started services with "bin/wso2server.bat".



Once it is started i am trying to access carbon and logged in with admin/admin credentials. Once i am logged in i created Tenant in configure module and created tenant successfully.



Once Tenant is created. I jumped into store URL and logged in with the selected Tenant credentials and created an application with that Tenant. Once Application is created. I tried to generate Client Id and Secret key.
I copied those details, i have API https://localhost:9443/oauth1/token for generating Access_Token. But unfortunately didnt worked with Windows 10 (64Bit) and Linux Ubuntu 16.04 version.



Please guide me where i m doing wrong with this approach.
enter image description here



enter image description here










share|improve this question

























  • Do you see any errors in wso2carbon.log? I guess you are getting this error when you hit the generate keys button in the application.

    – Pubci
    Nov 20 '18 at 19:11











  • @Ayyappa: Please show us a screenshot of the request you're sending. Also, please use this url to generate tokens. https://localhost:8243/token

    – Bee
    Nov 21 '18 at 4:02











  • @Bee Please find the attached screenshots of my tests. i tried with http then thrown SSL error and kept https back and tried. still no use.

    – Ayyappa A
    Nov 21 '18 at 5:31











  • I'm a bit confused. Your explanation says the URL has oauth1 in it, and the screenshot shows it has oauth2 in it. But in the error response I can see the correct URL as https://localhost:8243/token. Which one is the correct one? Question 2: please confirm you didn't change any files in repository/deployment directory.

    – Bee
    Nov 21 '18 at 9:14











  • Oauth1 is typo mistake.oauth2/token is copied from /carbon. You please tell me which one is correct and yes i didnt change anything in the directory. Finally with CURL i can test the localhost:8243/token with grant_type=client_credentials. and it given me the {"access_token":"4b10af9c-3bd2-37a3-a691-f40a303ae641","scope":"am_application_scope default","token_type":"Bearer","expires_in":3600}. using git bash not with postman.

    – Ayyappa A
    Nov 22 '18 at 4:31














1












1








1








As part of project learning, I m trying to access WSO2 API Manager. I downloaded the WSO2-AM-2.5.0. As my PC is already equipped with java. I havent installed.
I started services with "bin/wso2server.bat".



Once it is started i am trying to access carbon and logged in with admin/admin credentials. Once i am logged in i created Tenant in configure module and created tenant successfully.



Once Tenant is created. I jumped into store URL and logged in with the selected Tenant credentials and created an application with that Tenant. Once Application is created. I tried to generate Client Id and Secret key.
I copied those details, i have API https://localhost:9443/oauth1/token for generating Access_Token. But unfortunately didnt worked with Windows 10 (64Bit) and Linux Ubuntu 16.04 version.



Please guide me where i m doing wrong with this approach.
enter image description here



enter image description here










share|improve this question
















As part of project learning, I m trying to access WSO2 API Manager. I downloaded the WSO2-AM-2.5.0. As my PC is already equipped with java. I havent installed.
I started services with "bin/wso2server.bat".



Once it is started i am trying to access carbon and logged in with admin/admin credentials. Once i am logged in i created Tenant in configure module and created tenant successfully.



Once Tenant is created. I jumped into store URL and logged in with the selected Tenant credentials and created an application with that Tenant. Once Application is created. I tried to generate Client Id and Secret key.
I copied those details, i have API https://localhost:9443/oauth1/token for generating Access_Token. But unfortunately didnt worked with Windows 10 (64Bit) and Linux Ubuntu 16.04 version.



Please guide me where i m doing wrong with this approach.
enter image description here



enter image description here







wso2 wso2carbon






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 '18 at 5:29







Ayyappa A

















asked Nov 20 '18 at 17:17









Ayyappa AAyyappa A

2292417




2292417













  • Do you see any errors in wso2carbon.log? I guess you are getting this error when you hit the generate keys button in the application.

    – Pubci
    Nov 20 '18 at 19:11











  • @Ayyappa: Please show us a screenshot of the request you're sending. Also, please use this url to generate tokens. https://localhost:8243/token

    – Bee
    Nov 21 '18 at 4:02











  • @Bee Please find the attached screenshots of my tests. i tried with http then thrown SSL error and kept https back and tried. still no use.

    – Ayyappa A
    Nov 21 '18 at 5:31











  • I'm a bit confused. Your explanation says the URL has oauth1 in it, and the screenshot shows it has oauth2 in it. But in the error response I can see the correct URL as https://localhost:8243/token. Which one is the correct one? Question 2: please confirm you didn't change any files in repository/deployment directory.

    – Bee
    Nov 21 '18 at 9:14











  • Oauth1 is typo mistake.oauth2/token is copied from /carbon. You please tell me which one is correct and yes i didnt change anything in the directory. Finally with CURL i can test the localhost:8243/token with grant_type=client_credentials. and it given me the {"access_token":"4b10af9c-3bd2-37a3-a691-f40a303ae641","scope":"am_application_scope default","token_type":"Bearer","expires_in":3600}. using git bash not with postman.

    – Ayyappa A
    Nov 22 '18 at 4:31



















  • Do you see any errors in wso2carbon.log? I guess you are getting this error when you hit the generate keys button in the application.

    – Pubci
    Nov 20 '18 at 19:11











  • @Ayyappa: Please show us a screenshot of the request you're sending. Also, please use this url to generate tokens. https://localhost:8243/token

    – Bee
    Nov 21 '18 at 4:02











  • @Bee Please find the attached screenshots of my tests. i tried with http then thrown SSL error and kept https back and tried. still no use.

    – Ayyappa A
    Nov 21 '18 at 5:31











  • I'm a bit confused. Your explanation says the URL has oauth1 in it, and the screenshot shows it has oauth2 in it. But in the error response I can see the correct URL as https://localhost:8243/token. Which one is the correct one? Question 2: please confirm you didn't change any files in repository/deployment directory.

    – Bee
    Nov 21 '18 at 9:14











  • Oauth1 is typo mistake.oauth2/token is copied from /carbon. You please tell me which one is correct and yes i didnt change anything in the directory. Finally with CURL i can test the localhost:8243/token with grant_type=client_credentials. and it given me the {"access_token":"4b10af9c-3bd2-37a3-a691-f40a303ae641","scope":"am_application_scope default","token_type":"Bearer","expires_in":3600}. using git bash not with postman.

    – Ayyappa A
    Nov 22 '18 at 4:31

















Do you see any errors in wso2carbon.log? I guess you are getting this error when you hit the generate keys button in the application.

– Pubci
Nov 20 '18 at 19:11





Do you see any errors in wso2carbon.log? I guess you are getting this error when you hit the generate keys button in the application.

– Pubci
Nov 20 '18 at 19:11













@Ayyappa: Please show us a screenshot of the request you're sending. Also, please use this url to generate tokens. https://localhost:8243/token

– Bee
Nov 21 '18 at 4:02





@Ayyappa: Please show us a screenshot of the request you're sending. Also, please use this url to generate tokens. https://localhost:8243/token

– Bee
Nov 21 '18 at 4:02













@Bee Please find the attached screenshots of my tests. i tried with http then thrown SSL error and kept https back and tried. still no use.

– Ayyappa A
Nov 21 '18 at 5:31





@Bee Please find the attached screenshots of my tests. i tried with http then thrown SSL error and kept https back and tried. still no use.

– Ayyappa A
Nov 21 '18 at 5:31













I'm a bit confused. Your explanation says the URL has oauth1 in it, and the screenshot shows it has oauth2 in it. But in the error response I can see the correct URL as https://localhost:8243/token. Which one is the correct one? Question 2: please confirm you didn't change any files in repository/deployment directory.

– Bee
Nov 21 '18 at 9:14





I'm a bit confused. Your explanation says the URL has oauth1 in it, and the screenshot shows it has oauth2 in it. But in the error response I can see the correct URL as https://localhost:8243/token. Which one is the correct one? Question 2: please confirm you didn't change any files in repository/deployment directory.

– Bee
Nov 21 '18 at 9:14













Oauth1 is typo mistake.oauth2/token is copied from /carbon. You please tell me which one is correct and yes i didnt change anything in the directory. Finally with CURL i can test the localhost:8243/token with grant_type=client_credentials. and it given me the {"access_token":"4b10af9c-3bd2-37a3-a691-f40a303ae641","scope":"am_application_scope default","token_type":"Bearer","expires_in":3600}. using git bash not with postman.

– Ayyappa A
Nov 22 '18 at 4:31





Oauth1 is typo mistake.oauth2/token is copied from /carbon. You please tell me which one is correct and yes i didnt change anything in the directory. Finally with CURL i can test the localhost:8243/token with grant_type=client_credentials. and it given me the {"access_token":"4b10af9c-3bd2-37a3-a691-f40a303ae641","scope":"am_application_scope default","token_type":"Bearer","expires_in":3600}. using git bash not with postman.

– Ayyappa A
Nov 22 '18 at 4:31












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53398207%2fwso2-oauth2-token-is-throwing-the-405-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53398207%2fwso2-oauth2-token-is-throwing-the-405-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

How to fix TextFormField cause rebuild widget in Flutter