SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Solution:
Do not browse the api directly in the browser, the API is secure by JWT token so you can’t browse it directly.How to test the api if I can not use browser
You have to use POSTMAN like rest api client to do following steps- Step 1: Generate Token by browsing {urlServerURL}/token/generate.php
//Token request { "username":"admin", "password":"*******" }
- Step 2: Copy the access_token field
- Step 3: Now to call any endpoint go to that endpoint request tab in postman
- Step 4: Click on Authorization tab and select Bearer Token
- Step 5: Past the token in the filed provided
- Call the requested endpoint
Alternatively you can ask your developer to call the api in code.
Feel free to connect with me for any query.
Thanks