Please help me to find a solution to access api using JWT Token in react native platform.It gives response using postman , html form submission and using android.I faced a problem while ios app integration using react native and give authentication required false response. Here i am attached my api call using react native Android api call give correct response.What are the changes i have to implement in my react native code, Please Help.
Please help me to find a solution to access api using JWT Token in react native platform.It gives response using postman , html form submission and using android.I faced a problem while ios app integration using react native and give authentication required false response. Here i am attached my api call using react native Android api call give correct response.What are the changes i have to implement in my react native code, Please Help.
API call using React native:-
fetch('http://colorpages.net/erpnew/index.php/api/list/model/categorylist',{
method: 'POST',
headers: {
Accept: 'application/json', 'Content-Type': 'application/json', 'Token':'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjI4MyIsImxvZ2luZGF0ZSI6IjIwMjUtMDQtMDcgMTE6NTg6NDcifQ.czDlaoEXQzXAK4TDi-7FwxWkE-XoOYvhmpgFxZs9EEk' },
}).then((response) => response.json()) .then((responseJson) => { console.log("RES",responseJson) }) .catch((error) => { console.error(error); });