I am developing REST APIs for my project in Laravel 6.*. The problem is that my APIs are working in Postman Chrome Extention and web browser but not in Native Desktop Application. I'm am serving my laravel app. by using php artisan serve command. the The error which i got in postman console Note : I'm not using Bearer Token in this API After adding header
Asked
Active
Viewed 1,468 times
0
-
do you use Bearer Token for auth? – Muhammad Habibpour Dec 29 '21 at 04:53
-
can you give the screenshot of the headers that are you using? – neel Dec 29 '21 at 05:06
-
1According to Screenshot, You are not passing correct header token while calling API, Try to add your authorization code in the header tab of postman instead of authorization if its not working in that share picture of postman and your config for api call – Muhammad Ikram UL Mustafa Dec 29 '21 at 05:19
-
`Content-Type: application/json; charset=utf-8` can't see this headers. Add this and try again – Muhammad Habibpour Dec 29 '21 at 05:29
-
@MuhammadHabibpour Yes but not in this API. – Aadhar Dec 29 '21 at 13:13
-
@MuhammadHabibpour Adding this header still has not worked for me. – Aadhar Dec 29 '21 at 13:15
-
@Adhar Can you share your route picture as well? – Muhammad Ikram UL Mustafa Dec 30 '21 at 07:19
-
Please I am experiencing this with my application. Did you find a solution to this issue? – Buchi Aug 26 '22 at 18:27
-
@Buchi APIS on my personal laptop is working fine. I think it was the project-specific setup issue. – Aadhar Oct 31 '22 at 14:34
3 Answers
0
Since it checks for the csrf tokens,according to me it is not allowing third party to access the api.

Joel Dcunha
- 11
- 1
-
As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 29 '21 at 07:17
0
According to Screenshot, You are not passing the correct header token while calling API, Try to add your authorization code in the header tab of postman instead of in authorization.
if still, it's not working in that then share picture of postman and your config for API call

Muhammad Ikram UL Mustafa
- 360
- 4
- 15
0
You should share your postman config if you want better help.
I'd say the common culprits are :
- Check your Bearer token.
- Make sure you have a content-type header set to application/json if you're expecting a JSON.

Amrani Fares
- 16
- 2