Laravel api request from mobile app receives token page 419

  angular, ionic-framework, laravel, vue.js

Working on a small ionic framework application with laravel backend.

Request from postman or browser works fine, but builds from Android’s getting 419 token mismatch error with same endpoints.

Request Data from Android (error 419):

Headers Accept application/json Accept-Encoding gzip, deflate Accept-Language en-AU,en-US;q=0.9,en;q=0.8 Authorization [Filtered] Content-Length 25 Content-Type application/json Host app.example.com Origin http://localhost Referer http://localhost/ Sec-Fetch-Dest empty Sec-Fetch-Mode cors Sec-Fetch-Site cross-site User-Agent Mozilla/5.0 (Linux; Android 11; SM-A515F Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/93.0.4577.62 Mobile Safari/537.36 X-Requested-With io.ionic.starter

Request Data from postman (works fine):
Headers Accept */* Accept-Encoding gzip, deflate, br Connection keep-alive Content-Length 0 Content-Type Host app.example.com Postman-Token 814dd8ac-e4b3-dfg45-9f87-1649sdfdsfsd0eae User-Agent PostmanRuntime/7.28.4

Thanks.

Source: Laravel

Leave a Reply