Open sarinsurendran opened 8 years ago
This is the login api right.. I need how to get posts with authorisation. It shows unauthorized.
You should send an access token for every request. The token is response from login (see the response https://github.com/githubjeka/yii2-rest/issues/6#issuecomment-101134848)
Read more about authentication in http://www.yiiframework.com/doc-2.0/guide-rest-authentication.html (Query parameter)
Ok. If that is the case we have to pass only the token with request right. No need of passing username and password. Can you just send me the screen shot for posts request to clear the idea.
Yes
Ok thanks for your comments githubjeka.
http://localhost/api-template1/rest/web/v1/posts
shows http://prntscr.com/bpfq9v