REST API Access Token IssuesOAuth for REST API using PHPNot able to get OAuth token for Magento Rest API ClientMagento Rest Api from Consumer key not foundRest api oauth token emptyHow to use Magento 2 API?Login Magento Rest Api with Androidhow to use magento REST api for creating productsWhat would be authorization endpoint for oauth in magento 2POSTMAN rest and Magento-rest with OathMagento 2 token integration error

Did the Russian Empire have a claim to Sweden? Was there ever a time where they could have pursued it?

The alcoholic village festival

Why are examinees often not allowed to leave during the start and end of an exam?

Reusable spacecraft: why still have fairings detach, instead of open/close?

Where can I find my serialized Sitecore items?

Why did the Apple //e make a hideous noise if you inserted the disk upside down?

Installed software from source, how to say yum not to install it from package?

Is it OK to throw pebbles and stones in streams, waterfalls, ponds, etc.?

Having to constantly redo everything because I don't know how to do it

Can I take Amul cottage cheese from India to Netherlands?

Automorphisms and epimorphisms of finite groups

Perform mirror symmetry transformation of 3D model (in OBJ)

I just started; should I accept a farewell lunch for a coworker I don't know?

Journal standards vs. personal standards

What does 5d4 x 10 gp mean?

"I am [the / an] owner of a bookstore"?

What are good reward for players (other than XP and items)?

Can US Supreme Court justices / judges be "rotated" out against their will?

Early 2000s movie about time travel, protagonist travels back to save girlfriend, then into multiple points in future

Avoiding repetition when using the "snprintf idiom" to write text

How useful would a hydroelectric power plant be in the post-apocalypse world?

Is my guitar action too high or is the bridge too high?

What was the first science fiction or fantasy multiple choice book?

Why do movie directors use brown tint on Mexico cities?



REST API Access Token Issues


OAuth for REST API using PHPNot able to get OAuth token for Magento Rest API ClientMagento Rest Api from Consumer key not foundRest api oauth token emptyHow to use Magento 2 API?Login Magento Rest Api with Androidhow to use magento REST api for creating productsWhat would be authorization endpoint for oauth in magento 2POSTMAN rest and Magento-rest with OathMagento 2 token integration error













1















I am trying to use the Magento REST API for a client to get details of customers, and orders, etc. I have setup a REST Consumer and I am trying to obtain an oauth access token and having issues. I have found a API call http://clients_magento_shop/api/rest/integration/access/token in the documentation, passing the username and password in the body, however I am getting the following error "Request does not match any route" - its like the API resource doesn't exist.



The application I am building will be a background task, so having the user login to Magento to authorize the request token isn't an option. So I have tried to fake a login and authorization by GET and POST operations through C#. This works great on a standard Magento setup but because the client is using a hosting single signon provider, I cant get to the login page to obtain the Form-Key, which is part of the login POST. Therefore I am stuck.










share|improve this question




























    1















    I am trying to use the Magento REST API for a client to get details of customers, and orders, etc. I have setup a REST Consumer and I am trying to obtain an oauth access token and having issues. I have found a API call http://clients_magento_shop/api/rest/integration/access/token in the documentation, passing the username and password in the body, however I am getting the following error "Request does not match any route" - its like the API resource doesn't exist.



    The application I am building will be a background task, so having the user login to Magento to authorize the request token isn't an option. So I have tried to fake a login and authorization by GET and POST operations through C#. This works great on a standard Magento setup but because the client is using a hosting single signon provider, I cant get to the login page to obtain the Form-Key, which is part of the login POST. Therefore I am stuck.










    share|improve this question


























      1












      1








      1








      I am trying to use the Magento REST API for a client to get details of customers, and orders, etc. I have setup a REST Consumer and I am trying to obtain an oauth access token and having issues. I have found a API call http://clients_magento_shop/api/rest/integration/access/token in the documentation, passing the username and password in the body, however I am getting the following error "Request does not match any route" - its like the API resource doesn't exist.



      The application I am building will be a background task, so having the user login to Magento to authorize the request token isn't an option. So I have tried to fake a login and authorization by GET and POST operations through C#. This works great on a standard Magento setup but because the client is using a hosting single signon provider, I cant get to the login page to obtain the Form-Key, which is part of the login POST. Therefore I am stuck.










      share|improve this question
















      I am trying to use the Magento REST API for a client to get details of customers, and orders, etc. I have setup a REST Consumer and I am trying to obtain an oauth access token and having issues. I have found a API call http://clients_magento_shop/api/rest/integration/access/token in the documentation, passing the username and password in the body, however I am getting the following error "Request does not match any route" - its like the API resource doesn't exist.



      The application I am building will be a background task, so having the user login to Magento to authorize the request token isn't an option. So I have tried to fake a login and authorization by GET and POST operations through C#. This works great on a standard Magento setup but because the client is using a hosting single signon provider, I cant get to the login page to obtain the Form-Key, which is part of the login POST. Therefore I am stuck.







      api rest access






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 11 '17 at 10:59









      Teja Bhagavan Kollepara

      2,9994 gold badges20 silver badges51 bronze badges




      2,9994 gold badges20 silver badges51 bronze badges










      asked Aug 11 '17 at 10:56









      WayneWayne

      111 bronze badge




      111 bronze badge




















          1 Answer
          1






          active

          oldest

          votes


















          0














          You have to pass url like,




          http://clients_magento_shop/rest/V1/integration/admin/token




          Pass body method like this,



          Post Method:



          Body:

          "username":"admin",
          "password":"admin123"






          share|improve this answer























          • Thanks for the update Rakesh. There is something very weird here. I do have a access token provided by the client. If I use this do call customers or any other resource to format of the url is: clients_magento_shop/api/rest/resource however all the doc's and your example has clients_magento_shop/rest/V1/resource. If I use your format I get a 404 Note Found error :-(

            – Wayne
            Aug 11 '17 at 11:32












          • Bit late to the party, perhaps, but anyway: the api/rest format is Magento 1, whereas rest/V1 is Magento 2.

            – Doug McLean
            Apr 5 at 10:59













          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
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f188809%2frest-api-access-token-issues%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You have to pass url like,




          http://clients_magento_shop/rest/V1/integration/admin/token




          Pass body method like this,



          Post Method:



          Body:

          "username":"admin",
          "password":"admin123"






          share|improve this answer























          • Thanks for the update Rakesh. There is something very weird here. I do have a access token provided by the client. If I use this do call customers or any other resource to format of the url is: clients_magento_shop/api/rest/resource however all the doc's and your example has clients_magento_shop/rest/V1/resource. If I use your format I get a 404 Note Found error :-(

            – Wayne
            Aug 11 '17 at 11:32












          • Bit late to the party, perhaps, but anyway: the api/rest format is Magento 1, whereas rest/V1 is Magento 2.

            – Doug McLean
            Apr 5 at 10:59















          0














          You have to pass url like,




          http://clients_magento_shop/rest/V1/integration/admin/token




          Pass body method like this,



          Post Method:



          Body:

          "username":"admin",
          "password":"admin123"






          share|improve this answer























          • Thanks for the update Rakesh. There is something very weird here. I do have a access token provided by the client. If I use this do call customers or any other resource to format of the url is: clients_magento_shop/api/rest/resource however all the doc's and your example has clients_magento_shop/rest/V1/resource. If I use your format I get a 404 Note Found error :-(

            – Wayne
            Aug 11 '17 at 11:32












          • Bit late to the party, perhaps, but anyway: the api/rest format is Magento 1, whereas rest/V1 is Magento 2.

            – Doug McLean
            Apr 5 at 10:59













          0












          0








          0







          You have to pass url like,




          http://clients_magento_shop/rest/V1/integration/admin/token




          Pass body method like this,



          Post Method:



          Body:

          "username":"admin",
          "password":"admin123"






          share|improve this answer













          You have to pass url like,




          http://clients_magento_shop/rest/V1/integration/admin/token




          Pass body method like this,



          Post Method:



          Body:

          "username":"admin",
          "password":"admin123"







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 11 '17 at 11:02









          Rakesh JesadiyaRakesh Jesadiya

          31.1k15 gold badges80 silver badges134 bronze badges




          31.1k15 gold badges80 silver badges134 bronze badges












          • Thanks for the update Rakesh. There is something very weird here. I do have a access token provided by the client. If I use this do call customers or any other resource to format of the url is: clients_magento_shop/api/rest/resource however all the doc's and your example has clients_magento_shop/rest/V1/resource. If I use your format I get a 404 Note Found error :-(

            – Wayne
            Aug 11 '17 at 11:32












          • Bit late to the party, perhaps, but anyway: the api/rest format is Magento 1, whereas rest/V1 is Magento 2.

            – Doug McLean
            Apr 5 at 10:59

















          • Thanks for the update Rakesh. There is something very weird here. I do have a access token provided by the client. If I use this do call customers or any other resource to format of the url is: clients_magento_shop/api/rest/resource however all the doc's and your example has clients_magento_shop/rest/V1/resource. If I use your format I get a 404 Note Found error :-(

            – Wayne
            Aug 11 '17 at 11:32












          • Bit late to the party, perhaps, but anyway: the api/rest format is Magento 1, whereas rest/V1 is Magento 2.

            – Doug McLean
            Apr 5 at 10:59
















          Thanks for the update Rakesh. There is something very weird here. I do have a access token provided by the client. If I use this do call customers or any other resource to format of the url is: clients_magento_shop/api/rest/resource however all the doc's and your example has clients_magento_shop/rest/V1/resource. If I use your format I get a 404 Note Found error :-(

          – Wayne
          Aug 11 '17 at 11:32






          Thanks for the update Rakesh. There is something very weird here. I do have a access token provided by the client. If I use this do call customers or any other resource to format of the url is: clients_magento_shop/api/rest/resource however all the doc's and your example has clients_magento_shop/rest/V1/resource. If I use your format I get a 404 Note Found error :-(

          – Wayne
          Aug 11 '17 at 11:32














          Bit late to the party, perhaps, but anyway: the api/rest format is Magento 1, whereas rest/V1 is Magento 2.

          – Doug McLean
          Apr 5 at 10:59





          Bit late to the party, perhaps, but anyway: the api/rest format is Magento 1, whereas rest/V1 is Magento 2.

          – Doug McLean
          Apr 5 at 10:59

















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f188809%2frest-api-access-token-issues%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

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form