hasib32 / rest-api-with-lumen

Rest API boilerplate for Lumen micro-framework.
486 stars 144 forks source link

No getting information #32

Closed limaho closed 7 years ago

limaho commented 7 years ago

After getting the accessToken without any problem, how can I get another information from API. For example I trying to get the information of current user doing this:

screenshot from 2017-07-29 11-41-49 screenshot from 2017-07-29 11-43-02

But I am getting this when I use http://localhost/users/me:

{ "status": 405, "message": "Method Not Allowed" }

http://localhost/users

{ "status": 401, "message": "Unauthorized" } Also If I want to save new user or update. If someone has done this, can you share it. Thank you

hasib32 commented 7 years ago

Hi, you are using method type POST you should use GET

kabelo38 commented 7 years ago

LOL we can't access your localhost

For furthur API request after getting your access_token and refresh token, on your Header you have to add additional header "Authorization" and put access_token as the value

Understanding grant password : http://docs.apigee.com/api-services/content/implementing-password-grant-type more_calls_api_hasib32

hasib32 commented 7 years ago

Thanks @kabelo38

limaho commented 7 years ago

@hasib32 Thanks, was my mistake

hasib32 commented 7 years ago

@limaho No problem. I'm going to close the issue.