DELETE V1/addresses/:addressId - This Rest API is not working with Customer TokenAdd new customer address REST API : Magento 2Unable to get salesorders and Customers From Magento 2.2 using REST APIMagento 2.2.3 - Problem connecting via REST API (Shipworks)Neither Token nor Oauth API Authentication are working Magento 2.2.3Magento 2 token integration errorMagento 2 rest API - How to Manage API Authentication Lifecycle on Mobile Devices Application?MagentoSales resource could not access by customer tokenMagento 2 Rest auth for different website idsMagento 2 Customer Rest Api Token error for some users [weird problem]How can i Update Add and Delete user address in Application using PUT http://Base URL/rest/V1/customers/me?Accessing Admin data from Magento 2.1 Rest API

Does the attack bonus from a Masterwork weapon stack with the attack bonus from Masterwork ammunition?

How can an organ that provides biological immortality be unable to regenerate?

Help rendering a complicated sum/product formula

My friend is being a hypocrite

HP P840 HDD RAID 5 many strange drive failures

Calculate the frequency of characters in a string

Is it possible to stack the damage done by the Absorb Elements spell?

Can other pieces capture a threatening piece and prevent a checkmate?

Using Past-Perfect interchangeably with the Past Continuous

Recruiter wants very extensive technical details about all of my previous work

What favor did Moody owe Dumbledore?

When to use snap-off blade knife and when to use trapezoid blade knife?

How does 取材で訪れた integrate into this sentence?

What does Deadpool mean by "left the house in that shirt"?

Unfrosted light bulb

Is there a hypothetical scenario that would make Earth uninhabitable for humans, but not for (the majority of) other animals?

Is there a term for accumulated dirt on the outside of your hands and feet?

What does "Four-F." mean?

Fewest number of steps to reach 200 using special calculator

Describing a chess game in a novel

Pronounciation of the combination "st" in spanish accents

Hausdorff dimension of the boundary of fibres of Lipschitz maps

Deletion of copy-ctor & copy-assignment - public, private or protected?

What should I install to correct "ld: cannot find -lgbm and -linput" so that I can compile a Rust program?



DELETE V1/addresses/:addressId - This Rest API is not working with Customer Token


Add new customer address REST API : Magento 2Unable to get salesorders and Customers From Magento 2.2 using REST APIMagento 2.2.3 - Problem connecting via REST API (Shipworks)Neither Token nor Oauth API Authentication are working Magento 2.2.3Magento 2 token integration errorMagento 2 rest API - How to Manage API Authentication Lifecycle on Mobile Devices Application?MagentoSales resource could not access by customer tokenMagento 2 Rest auth for different website idsMagento 2 Customer Rest Api Token error for some users [weird problem]How can i Update Add and Delete user address in Application using PUT http://Base URL/rest/V1/customers/me?Accessing Admin data from Magento 2.1 Rest API













3















delete /V1/addresses/addressId


This is the Delete Address REST API in Magento 2.



It works with admin token , but not with customer token.



I think it should be working with customer token as customer should have rights to delete his own addresses stored.



This API has access permission for Resource : Magento_Customer::manage



This resource permission should be working with customer token, isn't it ?



Does anybody having the same issue ?










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.



















    3















    delete /V1/addresses/addressId


    This is the Delete Address REST API in Magento 2.



    It works with admin token , but not with customer token.



    I think it should be working with customer token as customer should have rights to delete his own addresses stored.



    This API has access permission for Resource : Magento_Customer::manage



    This resource permission should be working with customer token, isn't it ?



    Does anybody having the same issue ?










    share|improve this question
















    bumped to the homepage by Community 12 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      3












      3








      3








      delete /V1/addresses/addressId


      This is the Delete Address REST API in Magento 2.



      It works with admin token , but not with customer token.



      I think it should be working with customer token as customer should have rights to delete his own addresses stored.



      This API has access permission for Resource : Magento_Customer::manage



      This resource permission should be working with customer token, isn't it ?



      Does anybody having the same issue ?










      share|improve this question
















      delete /V1/addresses/addressId


      This is the Delete Address REST API in Magento 2.



      It works with admin token , but not with customer token.



      I think it should be working with customer token as customer should have rights to delete his own addresses stored.



      This API has access permission for Resource : Magento_Customer::manage



      This resource permission should be working with customer token, isn't it ?



      Does anybody having the same issue ?







      magento-2.1.7 rest-api






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 17 '17 at 13:03









      Raghu

      1,2811520




      1,2811520










      asked Aug 17 '17 at 12:34









      Vaibhav MunjparaVaibhav Munjpara

      265




      265





      bumped to the homepage by Community 12 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 12 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Customer token CANNOT access customerAddressRepositoryV1 so your API doesn't work on customer token. This is how swagger looks after inserting a customer token:
          enter image description here



          If customer wants to modify/delete customer address, we can use PUT /V1/customer/me. Although it doesn't list on swagger(Confirmed: it's a bug), it tested and successful on my 2.1.7 EE + POSTMAN. Here is a sample JSON for using PUT /V1/customer/me:




          "customer":
          "email": "your_email",
          "firstname": "your_firstname",
          "lastname": "your_lastname",
          "website_id": 1,
          "addresses": [

          ],
          ...




          Of course, you have to add token on header.






          share|improve this answer




















          • 1





            Thanks for your efforts.. I found that if there is a resource Magento_Customer::manage applied on webapi.xml , it indicates that we need to use admin token. And if Magento_Customer::customer resource is applied in any API, we can use customer token.

            – Vaibhav Munjpara
            Aug 20 '17 at 7:18











          • So i needed to use admin token. But I think my question can be considered as an enhancement for magento team. as customer should have rights to delete his own address with customer token. Thanks again...

            – Vaibhav Munjpara
            Aug 20 '17 at 7:20











          • Yes I think it should be an enhancement on it. BTW if my workaround works please accept my answer :)

            – PY Yick
            Aug 20 '17 at 10:49










          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%2f189504%2fdelete-v1-addresses-addressid-this-rest-api-is-not-working-with-customer-toke%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














          Customer token CANNOT access customerAddressRepositoryV1 so your API doesn't work on customer token. This is how swagger looks after inserting a customer token:
          enter image description here



          If customer wants to modify/delete customer address, we can use PUT /V1/customer/me. Although it doesn't list on swagger(Confirmed: it's a bug), it tested and successful on my 2.1.7 EE + POSTMAN. Here is a sample JSON for using PUT /V1/customer/me:




          "customer":
          "email": "your_email",
          "firstname": "your_firstname",
          "lastname": "your_lastname",
          "website_id": 1,
          "addresses": [

          ],
          ...




          Of course, you have to add token on header.






          share|improve this answer




















          • 1





            Thanks for your efforts.. I found that if there is a resource Magento_Customer::manage applied on webapi.xml , it indicates that we need to use admin token. And if Magento_Customer::customer resource is applied in any API, we can use customer token.

            – Vaibhav Munjpara
            Aug 20 '17 at 7:18











          • So i needed to use admin token. But I think my question can be considered as an enhancement for magento team. as customer should have rights to delete his own address with customer token. Thanks again...

            – Vaibhav Munjpara
            Aug 20 '17 at 7:20











          • Yes I think it should be an enhancement on it. BTW if my workaround works please accept my answer :)

            – PY Yick
            Aug 20 '17 at 10:49















          0














          Customer token CANNOT access customerAddressRepositoryV1 so your API doesn't work on customer token. This is how swagger looks after inserting a customer token:
          enter image description here



          If customer wants to modify/delete customer address, we can use PUT /V1/customer/me. Although it doesn't list on swagger(Confirmed: it's a bug), it tested and successful on my 2.1.7 EE + POSTMAN. Here is a sample JSON for using PUT /V1/customer/me:




          "customer":
          "email": "your_email",
          "firstname": "your_firstname",
          "lastname": "your_lastname",
          "website_id": 1,
          "addresses": [

          ],
          ...




          Of course, you have to add token on header.






          share|improve this answer




















          • 1





            Thanks for your efforts.. I found that if there is a resource Magento_Customer::manage applied on webapi.xml , it indicates that we need to use admin token. And if Magento_Customer::customer resource is applied in any API, we can use customer token.

            – Vaibhav Munjpara
            Aug 20 '17 at 7:18











          • So i needed to use admin token. But I think my question can be considered as an enhancement for magento team. as customer should have rights to delete his own address with customer token. Thanks again...

            – Vaibhav Munjpara
            Aug 20 '17 at 7:20











          • Yes I think it should be an enhancement on it. BTW if my workaround works please accept my answer :)

            – PY Yick
            Aug 20 '17 at 10:49













          0












          0








          0







          Customer token CANNOT access customerAddressRepositoryV1 so your API doesn't work on customer token. This is how swagger looks after inserting a customer token:
          enter image description here



          If customer wants to modify/delete customer address, we can use PUT /V1/customer/me. Although it doesn't list on swagger(Confirmed: it's a bug), it tested and successful on my 2.1.7 EE + POSTMAN. Here is a sample JSON for using PUT /V1/customer/me:




          "customer":
          "email": "your_email",
          "firstname": "your_firstname",
          "lastname": "your_lastname",
          "website_id": 1,
          "addresses": [

          ],
          ...




          Of course, you have to add token on header.






          share|improve this answer















          Customer token CANNOT access customerAddressRepositoryV1 so your API doesn't work on customer token. This is how swagger looks after inserting a customer token:
          enter image description here



          If customer wants to modify/delete customer address, we can use PUT /V1/customer/me. Although it doesn't list on swagger(Confirmed: it's a bug), it tested and successful on my 2.1.7 EE + POSTMAN. Here is a sample JSON for using PUT /V1/customer/me:




          "customer":
          "email": "your_email",
          "firstname": "your_firstname",
          "lastname": "your_lastname",
          "website_id": 1,
          "addresses": [

          ],
          ...




          Of course, you have to add token on header.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 21 '17 at 3:29

























          answered Aug 18 '17 at 3:35









          PY YickPY Yick

          1,757821




          1,757821







          • 1





            Thanks for your efforts.. I found that if there is a resource Magento_Customer::manage applied on webapi.xml , it indicates that we need to use admin token. And if Magento_Customer::customer resource is applied in any API, we can use customer token.

            – Vaibhav Munjpara
            Aug 20 '17 at 7:18











          • So i needed to use admin token. But I think my question can be considered as an enhancement for magento team. as customer should have rights to delete his own address with customer token. Thanks again...

            – Vaibhav Munjpara
            Aug 20 '17 at 7:20











          • Yes I think it should be an enhancement on it. BTW if my workaround works please accept my answer :)

            – PY Yick
            Aug 20 '17 at 10:49












          • 1





            Thanks for your efforts.. I found that if there is a resource Magento_Customer::manage applied on webapi.xml , it indicates that we need to use admin token. And if Magento_Customer::customer resource is applied in any API, we can use customer token.

            – Vaibhav Munjpara
            Aug 20 '17 at 7:18











          • So i needed to use admin token. But I think my question can be considered as an enhancement for magento team. as customer should have rights to delete his own address with customer token. Thanks again...

            – Vaibhav Munjpara
            Aug 20 '17 at 7:20











          • Yes I think it should be an enhancement on it. BTW if my workaround works please accept my answer :)

            – PY Yick
            Aug 20 '17 at 10:49







          1




          1





          Thanks for your efforts.. I found that if there is a resource Magento_Customer::manage applied on webapi.xml , it indicates that we need to use admin token. And if Magento_Customer::customer resource is applied in any API, we can use customer token.

          – Vaibhav Munjpara
          Aug 20 '17 at 7:18





          Thanks for your efforts.. I found that if there is a resource Magento_Customer::manage applied on webapi.xml , it indicates that we need to use admin token. And if Magento_Customer::customer resource is applied in any API, we can use customer token.

          – Vaibhav Munjpara
          Aug 20 '17 at 7:18













          So i needed to use admin token. But I think my question can be considered as an enhancement for magento team. as customer should have rights to delete his own address with customer token. Thanks again...

          – Vaibhav Munjpara
          Aug 20 '17 at 7:20





          So i needed to use admin token. But I think my question can be considered as an enhancement for magento team. as customer should have rights to delete his own address with customer token. Thanks again...

          – Vaibhav Munjpara
          Aug 20 '17 at 7:20













          Yes I think it should be an enhancement on it. BTW if my workaround works please accept my answer :)

          – PY Yick
          Aug 20 '17 at 10:49





          Yes I think it should be an enhancement on it. BTW if my workaround works please accept my answer :)

          – PY Yick
          Aug 20 '17 at 10:49

















          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%2f189504%2fdelete-v1-addresses-addressid-this-rest-api-is-not-working-with-customer-toke%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

          Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

          Magento 2 disable Secret Key on URL's from terminal The Next CEO of Stack OverflowMagento 2 Shortcut/GUI tool to perform commandline tasks for windowsIn menu add configuration linkMagento oAuth : Generating access token and access secretMagento 2 security key issue in Third-Party API redirect URIPublic actions in admin controllersHow to Disable Cache in Custom WidgetURL Key not changing in Magento 2Product URL Key gets deleted when importing custom options - Magento 2Problem with reindex terminalMagento 2 - bin/magento Commands not working in Cpanel Terminal

          Aasi (pallopeli) Navigointivalikko