magefan / module-blog

Magento 2 Blog Extension is a solution that helps you to create a blog on Magento and manage posts,categories, tags, authors, and comments.
https://magefan.com/magento2-blog-extension
Other
265 stars 136 forks source link

Use customer token without admin token REST API #68

Closed msliman closed 7 years ago

msliman commented 7 years ago

Hi, I am using the API of the extension for the mobile app, but I don't want to use admin token for security wise, How can i use customer token?

magefan commented 7 years ago

@msliman if you take a look at webapi.xml, you will find methods, that does not require authorization (admin token). E.g." curl "http://mystore.com/index.php/rest/V1/blog/post/view/:id/:store_id" - to get post data by id and store_id

curl "http://mystore.com/index.php/rest/V1/blog/post/list/:type/:term/:store_id/:page/:limit" - to get post list by different parameters (Magefan\Blog\Model\PostManagement::getList)

curl "http://mystore.com/index.php/rest/V1/blog/category/view/:id/:store_id" - to get category data by id and store_id

Also make sure you are using Magento 2 Blog Extension v2.5.0