Magento 2 - Customer/Token Rest API issue
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
Customer is signup through rest api in magento 2.3 successfully. after signup, I am unable to get customer's token through customer/token rest api.
Api returns following error:

Any help, experience and knowledge sharing would be appreciated.
magento2 customer magento2.3 rest-api token
|
show 3 more comments
Customer is signup through rest api in magento 2.3 successfully. after signup, I am unable to get customer's token through customer/token rest api.
Api returns following error:

Any help, experience and knowledge sharing would be appreciated.
magento2 customer magento2.3 rest-api token
Hello @Muhammad, magefms is right 'all' shouldn't be there in URL and in devdocs devdocs.magento.com/guides/v2.3/get-started/authentication/… there is also the url without "all" key word
– Aaditya
yesterday
1
@AadityaPOST <host>/rest/<store_code>/V1/integration/customer/token. You can also this in devdocs in endpoint detail. Thanks for the comment
– Muhammad Hasham
yesterday
Yes totally agree /rest/english/V1/integration/customer/token I have Eglish store name which is working fine, Do you have store named "all" ?
– Aaditya
yesterday
1
and If you haven't configure then you can go with /rest/default/V1/integration/customer/token
– Aaditya
yesterday
1
@Aaditya that's the thing I am looking for. Nice point Yes It is for default. Now you got it
– Muhammad Hasham
yesterday
|
show 3 more comments
Customer is signup through rest api in magento 2.3 successfully. after signup, I am unable to get customer's token through customer/token rest api.
Api returns following error:

Any help, experience and knowledge sharing would be appreciated.
magento2 customer magento2.3 rest-api token
Customer is signup through rest api in magento 2.3 successfully. after signup, I am unable to get customer's token through customer/token rest api.
Api returns following error:

Any help, experience and knowledge sharing would be appreciated.
magento2 customer magento2.3 rest-api token
magento2 customer magento2.3 rest-api token
asked yesterday
Muhammad HashamMuhammad Hasham
2,9252931
2,9252931
Hello @Muhammad, magefms is right 'all' shouldn't be there in URL and in devdocs devdocs.magento.com/guides/v2.3/get-started/authentication/… there is also the url without "all" key word
– Aaditya
yesterday
1
@AadityaPOST <host>/rest/<store_code>/V1/integration/customer/token. You can also this in devdocs in endpoint detail. Thanks for the comment
– Muhammad Hasham
yesterday
Yes totally agree /rest/english/V1/integration/customer/token I have Eglish store name which is working fine, Do you have store named "all" ?
– Aaditya
yesterday
1
and If you haven't configure then you can go with /rest/default/V1/integration/customer/token
– Aaditya
yesterday
1
@Aaditya that's the thing I am looking for. Nice point Yes It is for default. Now you got it
– Muhammad Hasham
yesterday
|
show 3 more comments
Hello @Muhammad, magefms is right 'all' shouldn't be there in URL and in devdocs devdocs.magento.com/guides/v2.3/get-started/authentication/… there is also the url without "all" key word
– Aaditya
yesterday
1
@AadityaPOST <host>/rest/<store_code>/V1/integration/customer/token. You can also this in devdocs in endpoint detail. Thanks for the comment
– Muhammad Hasham
yesterday
Yes totally agree /rest/english/V1/integration/customer/token I have Eglish store name which is working fine, Do you have store named "all" ?
– Aaditya
yesterday
1
and If you haven't configure then you can go with /rest/default/V1/integration/customer/token
– Aaditya
yesterday
1
@Aaditya that's the thing I am looking for. Nice point Yes It is for default. Now you got it
– Muhammad Hasham
yesterday
Hello @Muhammad, magefms is right 'all' shouldn't be there in URL and in devdocs devdocs.magento.com/guides/v2.3/get-started/authentication/… there is also the url without "all" key word
– Aaditya
yesterday
Hello @Muhammad, magefms is right 'all' shouldn't be there in URL and in devdocs devdocs.magento.com/guides/v2.3/get-started/authentication/… there is also the url without "all" key word
– Aaditya
yesterday
1
1
@Aaditya
POST <host>/rest/<store_code>/V1/integration/customer/token. You can also this in devdocs in endpoint detail. Thanks for the comment– Muhammad Hasham
yesterday
@Aaditya
POST <host>/rest/<store_code>/V1/integration/customer/token. You can also this in devdocs in endpoint detail. Thanks for the comment– Muhammad Hasham
yesterday
Yes totally agree /rest/english/V1/integration/customer/token I have Eglish store name which is working fine, Do you have store named "all" ?
– Aaditya
yesterday
Yes totally agree /rest/english/V1/integration/customer/token I have Eglish store name which is working fine, Do you have store named "all" ?
– Aaditya
yesterday
1
1
and If you haven't configure then you can go with /rest/default/V1/integration/customer/token
– Aaditya
yesterday
and If you haven't configure then you can go with /rest/default/V1/integration/customer/token
– Aaditya
yesterday
1
1
@Aaditya that's the thing I am looking for. Nice point Yes It is for default. Now you got it
– Muhammad Hasham
yesterday
@Aaditya that's the thing I am looking for. Nice point Yes It is for default. Now you got it
– Muhammad Hasham
yesterday
|
show 3 more comments
2 Answers
2
active
oldest
votes
For customer token if you want it store wise then you need to pass store_code in the API url
POST <host>/rest/<store_code>/V1/integration/customer/token
But if you haven't configure any stores then pass default
POST <host>/rest/default/V1/integration/customer/token
And to fetch all store data using API
storeStoreRepositoryV1
Group repository interface
http://magento.host/index.php/rest/V1/store/storeGroups
method : GETAuthorization : Bearer <admin token>
This will return website_id, root_category_id, default_store_id, name, code
add a comment |
Instead of using /rest/all/V1/integration/customer/token
use this endpoint /rest/V1/integration/customer/token and you will get token.
It should be/rest/all/V1. check the endpoint detail in documentation. A combination of the server that fulfills the request, the web service, and the resource against which the request is being made. For example, in the POST <host>/rest/<store_code>/V1/integration/customer/token endpoint: The server is magento.host/index.php/, the web service is rest. and the resource is /V1/integration/customer/token.
– Muhammad Hasham
yesterday
okay just want to share what works as per my experience
– magefms
yesterday
1
Thanks for the answer. Really appreciated.
– Muhammad Hasham
yesterday
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270247%2fmagento-2-customer-token-rest-api-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
For customer token if you want it store wise then you need to pass store_code in the API url
POST <host>/rest/<store_code>/V1/integration/customer/token
But if you haven't configure any stores then pass default
POST <host>/rest/default/V1/integration/customer/token
And to fetch all store data using API
storeStoreRepositoryV1
Group repository interface
http://magento.host/index.php/rest/V1/store/storeGroups
method : GETAuthorization : Bearer <admin token>
This will return website_id, root_category_id, default_store_id, name, code
add a comment |
For customer token if you want it store wise then you need to pass store_code in the API url
POST <host>/rest/<store_code>/V1/integration/customer/token
But if you haven't configure any stores then pass default
POST <host>/rest/default/V1/integration/customer/token
And to fetch all store data using API
storeStoreRepositoryV1
Group repository interface
http://magento.host/index.php/rest/V1/store/storeGroups
method : GETAuthorization : Bearer <admin token>
This will return website_id, root_category_id, default_store_id, name, code
add a comment |
For customer token if you want it store wise then you need to pass store_code in the API url
POST <host>/rest/<store_code>/V1/integration/customer/token
But if you haven't configure any stores then pass default
POST <host>/rest/default/V1/integration/customer/token
And to fetch all store data using API
storeStoreRepositoryV1
Group repository interface
http://magento.host/index.php/rest/V1/store/storeGroups
method : GETAuthorization : Bearer <admin token>
This will return website_id, root_category_id, default_store_id, name, code
For customer token if you want it store wise then you need to pass store_code in the API url
POST <host>/rest/<store_code>/V1/integration/customer/token
But if you haven't configure any stores then pass default
POST <host>/rest/default/V1/integration/customer/token
And to fetch all store data using API
storeStoreRepositoryV1
Group repository interface
http://magento.host/index.php/rest/V1/store/storeGroups
method : GETAuthorization : Bearer <admin token>
This will return website_id, root_category_id, default_store_id, name, code
answered yesterday
AadityaAaditya
4,27121139
4,27121139
add a comment |
add a comment |
Instead of using /rest/all/V1/integration/customer/token
use this endpoint /rest/V1/integration/customer/token and you will get token.
It should be/rest/all/V1. check the endpoint detail in documentation. A combination of the server that fulfills the request, the web service, and the resource against which the request is being made. For example, in the POST <host>/rest/<store_code>/V1/integration/customer/token endpoint: The server is magento.host/index.php/, the web service is rest. and the resource is /V1/integration/customer/token.
– Muhammad Hasham
yesterday
okay just want to share what works as per my experience
– magefms
yesterday
1
Thanks for the answer. Really appreciated.
– Muhammad Hasham
yesterday
add a comment |
Instead of using /rest/all/V1/integration/customer/token
use this endpoint /rest/V1/integration/customer/token and you will get token.
It should be/rest/all/V1. check the endpoint detail in documentation. A combination of the server that fulfills the request, the web service, and the resource against which the request is being made. For example, in the POST <host>/rest/<store_code>/V1/integration/customer/token endpoint: The server is magento.host/index.php/, the web service is rest. and the resource is /V1/integration/customer/token.
– Muhammad Hasham
yesterday
okay just want to share what works as per my experience
– magefms
yesterday
1
Thanks for the answer. Really appreciated.
– Muhammad Hasham
yesterday
add a comment |
Instead of using /rest/all/V1/integration/customer/token
use this endpoint /rest/V1/integration/customer/token and you will get token.
Instead of using /rest/all/V1/integration/customer/token
use this endpoint /rest/V1/integration/customer/token and you will get token.
answered yesterday
magefmsmagefms
2,7252528
2,7252528
It should be/rest/all/V1. check the endpoint detail in documentation. A combination of the server that fulfills the request, the web service, and the resource against which the request is being made. For example, in the POST <host>/rest/<store_code>/V1/integration/customer/token endpoint: The server is magento.host/index.php/, the web service is rest. and the resource is /V1/integration/customer/token.
– Muhammad Hasham
yesterday
okay just want to share what works as per my experience
– magefms
yesterday
1
Thanks for the answer. Really appreciated.
– Muhammad Hasham
yesterday
add a comment |
It should be/rest/all/V1. check the endpoint detail in documentation. A combination of the server that fulfills the request, the web service, and the resource against which the request is being made. For example, in the POST <host>/rest/<store_code>/V1/integration/customer/token endpoint: The server is magento.host/index.php/, the web service is rest. and the resource is /V1/integration/customer/token.
– Muhammad Hasham
yesterday
okay just want to share what works as per my experience
– magefms
yesterday
1
Thanks for the answer. Really appreciated.
– Muhammad Hasham
yesterday
It should be
/rest/all/V1. check the endpoint detail in documentation. A combination of the server that fulfills the request, the web service, and the resource against which the request is being made. For example, in the POST <host>/rest/<store_code>/V1/integration/customer/token endpoint: The server is magento.host/index.php/, the web service is rest. and the resource is /V1/integration/customer/token.– Muhammad Hasham
yesterday
It should be
/rest/all/V1. check the endpoint detail in documentation. A combination of the server that fulfills the request, the web service, and the resource against which the request is being made. For example, in the POST <host>/rest/<store_code>/V1/integration/customer/token endpoint: The server is magento.host/index.php/, the web service is rest. and the resource is /V1/integration/customer/token.– Muhammad Hasham
yesterday
okay just want to share what works as per my experience
– magefms
yesterday
okay just want to share what works as per my experience
– magefms
yesterday
1
1
Thanks for the answer. Really appreciated.
– Muhammad Hasham
yesterday
Thanks for the answer. Really appreciated.
– Muhammad Hasham
yesterday
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270247%2fmagento-2-customer-token-rest-api-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Hello @Muhammad, magefms is right 'all' shouldn't be there in URL and in devdocs devdocs.magento.com/guides/v2.3/get-started/authentication/… there is also the url without "all" key word
– Aaditya
yesterday
1
@Aaditya
POST <host>/rest/<store_code>/V1/integration/customer/token. You can also this in devdocs in endpoint detail. Thanks for the comment– Muhammad Hasham
yesterday
Yes totally agree /rest/english/V1/integration/customer/token I have Eglish store name which is working fine, Do you have store named "all" ?
– Aaditya
yesterday
1
and If you haven't configure then you can go with /rest/default/V1/integration/customer/token
– Aaditya
yesterday
1
@Aaditya that's the thing I am looking for. Nice point Yes It is for default. Now you got it
– Muhammad Hasham
yesterday