Page 1 of 2

When to obtain a new token

Posted: Tue Jun 28, 2016 9:49 am
by jdwirtz
I'm having a bit of a problem getting schedules and it seems that I'm getting

[response] => INVALID_USER

Code: Select all

 => 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

Re: When to obtain a new token

Posted: Tue Jun 28, 2016 10:29 am
by rkulagow

Re: When to obtain a new token

Posted: Tue Jun 28, 2016 4:44 pm
by jdwirtz
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?

Re: When to obtain a new token

Posted: Tue Jun 28, 2016 4:49 pm
by rkulagow
Yeah, don't do that.

Re: When to obtain a new token

Posted: Tue Jun 28, 2016 6:27 pm
by jdwirtz
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

Re: When to obtain a new token

Posted: Tue Jun 28, 2016 9:27 pm
by rmeden
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

Re: When to obtain a new token

Posted: Wed Jun 29, 2016 5:34 am
by jdwirtz
So... you do only get one token per login/account?

Jim

Re: When to obtain a new token

Posted: Wed Jun 29, 2016 6:57 am
by rkulagow
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.

Re: When to obtain a new token

Posted: Wed Jun 29, 2016 10:52 am
by jdwirtz
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.

Re: When to obtain a new token

Posted: Wed Jun 29, 2016 11:29 am
by rkulagow
Yes, only one outstanding token at a time.