T
T
timonck2019-06-12 13:42:26
API
timonck, 2019-06-12 13:42:26

How to log in to get a RESTful token?

I'm new to APIs
. For a project, you need to use API requests to get data from the server. To do this, you need to log in and get a token. I do not know how to do that.
request example
-v \
-X POST \
-H 'Content-Type: application/json' \
-d '{"email": "[email protected]", "password": "password"}' \
https:/ /gentle-escarpment-19443.herokuapp.com/v1/u... I
send requests via Postman
example result
{
"id": 1,
"access_token": "V9UBRgaaWesQ2aPEQpcMH0J7X32f5GrVpHsG"
}
And I get Unauthorized. You are requesting with an invalid credential.
how to do it right? What can be read for better understanding?
I will be very grateful for your advice

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Chefranov, 2019-06-12
@timonck

5d00df5dcaa41985592728.png
5d00df3832a56587417749.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question