NetTalk Central

Author Topic: API requests requiring login and password  (Read 1815 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
    • Email
API requests requiring login and password
« on: July 01, 2024, 10:21:26 AM »
HI,
NT 14.21  C11.0.136
I have a net talk server with an API method which requires a login and Password.
I have a NetWebClient talking to it.  It intermittently makes several requests to the server within a 2 minute span.
I have the First request of the NetWEbClient logging in ( successfully).
Question:
Do subsequent requests by the same Logged in Client need to have the authorization string included or is the Client get logged in once and then the session ID is remembered until the session times out?  If this is the case, then the authorization string needs to be included on only the first request ?
Thanks,
Ron

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11232
    • View Profile
Re: API requests requiring login and password
« Reply #1 on: July 02, 2024, 06:39:39 PM »
Hi Ron,

>> Do subsequent requests by the same Logged in Client need to have the authorization string included or is the Client get logged in once and then the session ID is remembered until the session times out? 

Depends. n your server implementation, and also whether the client is sending the session cookie or not.
It's possible to set it up either way.

Cheers
Bruce

rjolda

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
    • Email
Re: API requests requiring login and password
« Reply #2 on: July 03, 2024, 10:19:12 AM »
Hi Bruce,
Another dumb question... .how do I set up my server and API to make sure they are passing a cookie?
Thanks,
Ron

rjolda

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
    • Email
Re: API requests requiring login and password
« Reply #3 on: July 03, 2024, 12:04:40 PM »
Ahhh,
Found the chapter on COOKIES in Consuming APIs book!
Ron