When to obtain a new token

Use this forum to discuss issues related to the SD-JSON service.

When to obtain a new token

Postby jdwirtz » Tue Jun 28, 2016 9:49 am

I'm having a bit of a problem getting schedules and it seems that I'm getting

[response] => INVALID_USER
[code] => 4003
[serverID] => 20141201.web.1
[message] => Invalid username or token has expired.
[datetime] => 2016-06-28T15:23:49Z

while I'm attempting to download the schedules. I obtain the token before I
start the schedule retrieval run. I'm still in the process of building my new
guide listings so while it is retrieving the schedule, is testing other processes
where at the beginning of that process I also obtain a token.
So am I shooting myself in the foot?
Is asking for a new token for the current process killing the token of the running process? If that is the case, what is best practice for obtaining tokens?
Do I only get/have one token to my username?

Jim
jdwirtz
 
Posts: 8
Joined: Thu Jun 16, 2016 7:28 am

Re: When to obtain a new token

Postby rkulagow » Tue Jun 28, 2016 10:29 am

rkulagow
SD Staff
 
Posts: 880
Joined: Tue Aug 14, 2007 3:15 pm

Re: When to obtain a new token

Postby jdwirtz » Tue Jun 28, 2016 4:44 pm

Yes... I've read that So...... what if I'm attempting to access the data from a
couple of different computers? Just don't do it at the same time?
jdwirtz
 
Posts: 8
Joined: Thu Jun 16, 2016 7:28 am

Re: When to obtain a new token

Postby rkulagow » Tue Jun 28, 2016 4:49 pm

Yeah, don't do that.
rkulagow
SD Staff
 
Posts: 880
Joined: Tue Aug 14, 2007 3:15 pm

Re: When to obtain a new token

Postby jdwirtz » Tue Jun 28, 2016 6:27 pm

I was really hoping for more help than. "Yeah, don't do that."
I have 3 NextPVR servers running all set to update the schedules
at the same time. How is NextPVR getting away with it?

Are we really limited to one login and one token at a time?

Jim
jdwirtz
 
Posts: 8
Joined: Thu Jun 16, 2016 7:28 am

Re: When to obtain a new token

Postby rmeden » Tue Jun 28, 2016 9:27 pm

They don't update all the time... they update for maybe 2-3 minutes a few times a day. Don't schedule them all at the same time.

Randomized times are good all-around.

Robert
rmeden
SD Board Member
 
Posts: 1484
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: When to obtain a new token

Postby jdwirtz » Wed Jun 29, 2016 5:34 am

So... you do only get one token per login/account?

Jim
jdwirtz
 
Posts: 8
Joined: Thu Jun 16, 2016 7:28 am

Re: When to obtain a new token

Postby rkulagow » Wed Jun 29, 2016 6:57 am

jdwirtz wrote:So... you do only get one token per login/account?
Jim


Yes. Please look at the documentation that I provided in the link upthread; it explains how the tokens work, and what their lifecycle is.
rkulagow
SD Staff
 
Posts: 880
Joined: Tue Aug 14, 2007 3:15 pm

Re: When to obtain a new token

Postby jdwirtz » Wed Jun 29, 2016 10:52 am

Yes I've read it and made use of it. I'm just trying to get some clarification on it.
It reads like I can only get a single token per my user account. Just want to be sure
that is really the case.
jdwirtz
 
Posts: 8
Joined: Thu Jun 16, 2016 7:28 am

Re: When to obtain a new token

Postby rkulagow » Wed Jun 29, 2016 11:29 am

Yes, only one outstanding token at a time.
rkulagow
SD Staff
 
Posts: 880
Joined: Tue Aug 14, 2007 3:15 pm

Next

Return to SD-JSON service

Who is online

Users browsing this forum: No registered users and 1 guest

cron