How to Revoke customer access token Magento 2?

Magento 2 Revoke customer access token for the current customer by customer id.

If the customer has already access token, that will be stored inside the oauth_token table in the database. A token column used to save the value of specific customer token.

When you call the revoke token method, all the available token for the customer will be removed from the database table. Continue reading “How to Revoke customer access token Magento 2?”

How to get customer access token by id for REST api Magento 2?

Get Customer token for the REST API using customer id in Magento 2 used to call API.

If you have customer id, retrieve the token by the Token factory class of the Integration module.

Instantiate the Magento\Integration\Model\Oauth\TokenFactory in your class constructor method. Continue reading “How to get customer access token by id for REST api Magento 2?”

How to Update product using REST API /V1/products/:sku in Magento 2?

In Magento 2, You can update already existing products using REST API. You need to call the updated product request URL to perform the update action.

For Update Product, you need to call the PUT method as action Type.

Action: PUT

Request URL: <YOUR_SITE_URL>/rest/V1/products/<SKU>

Replace YOUR_SITE_URwith the actual site URL and SKU with your product SKU which you want to update data.

Continue reading “How to Update product using REST API /V1/products/:sku in Magento 2?”