Get a token for the API
rowasc opened this issue · comments
Romina Suarez commented
-
when fetching or posting, check localStorage first
- if the token exists, you get it and send it in the headers. The headers will have to be sent in this format "Authorization: Bearer "
- if the token does not exist -> make the token request, grab the access_token
- save the access_token in localStorage
-
When posting a new report or doing any other requests to the API, the headers will have to be sent in this format "Authorization: Bearer "