How to use Cookie: sid to authenticate in API?

I am using REST API.

How to use Cookie: sid to authenticate?

Cookie: sid (send this to authenticate future requests).

Hy @Nitin_Chintamani1
Read this document REST API
Thank You!

I already have gone thru the documentation.
I am looking for the following functionality for my Mobile App.

  1. User will login using User Name and Password for the first time. Using the Frappe’sRest API, request will go to Frappe site, which will generate one access token and return to App.
  2. App will keep the token for future queries. Every query will be validated using the access token.
  3. Token will get expired automatically after 1 day.

@Nitin_Chintamani1 depends on the language you using . the login request will send the sid as a cookie . then in your future requests send them with the same cookie . for example in python it’s just this :

import requests
cookies = {'sid': '17ab96bd8ffbe8ca58a78657a918558'}
r = requests.post('url', cookies=cookies)

@bahaou I am making REST API Calls for Authentication from external APP.

I have not written any script in Frappe site.

@Nitin_Chintamani1 you do not need to write anything in frappe site . just use the normal rest api login . you will receive the sid inside the response , then for your future calls use the sid as a cookie .

Exactly, My question is same…

How to use sid or cookie while making the next call to read records?

@Nitin_Chintamani1 depends on the language you using . the example above works for python .

How to call from postman?

Yes, I mean from postman. Without native language support.

In the Password Based Authentication can we get token ?

Like here REST API