NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 2 3 4 5 … 93 Next »
NextPVR 5: When is PIN Required for API Access?

 
  • 0 Vote(s) - 0 Average
NextPVR 5: When is PIN Required for API Access?
pkscout
Offline

Senior Member

USA
Posts: 438
Threads: 48
Joined: May 2014
#1
2020-05-25, 11:04 PM
I'm writing a utility to do some integration with TV Maze (https://tvmaze.com), and I have the initial code working so that I can check a list of shows (presumably new to me) and add recurring recordings to NextPVR if there are new episodes in the next 10 days.  I realized this morning that I've been able to make all the API calls to NextPVR without authentication, and I'm assuming that's because I'm accessing it via localhost (I have NextPVR running on Docker on my development Mac).  That'll actually work fine for me even in production, but I'd like to provide the option for someone to run the script somewhere else.  When is the PIN required for API access, and how does it get sent (in the header, as basic auth in the URL, as an additional Get param, etc?).

Thanks.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 45,322
Threads: 865
Joined: May 2006
#2
2020-05-25, 11:21 PM (This post was last modified: 2020-05-25, 11:54 PM by mvallevand.)
It is good practice to always login because sub has said he could block us as much as I hate the idea. If localhost is ipv6 many API calls fail

I did post a python snippet to do this https://forums.nextpvr.com/showthread.ph...#pid525420 if you'd like

If you want a nice site for new shows at a glance this one is good too https://www.pogdesign.co.uk/cat/ It shows premiers finales etc and is colour code too.

Martin
pkscout
Offline

Senior Member

USA
Posts: 438
Threads: 48
Joined: May 2014
#3
2020-05-26, 03:44 AM
(2020-05-25, 11:21 PM)mvallevand Wrote: It is good practice to always login because sub has said he could block us as much as I hate the idea.  If localhost is ipv6 many API calls fail

I did post a python snippet to do this https://forums.nextpvr.com/showthread.ph...#pid525420 if you'd like

If you want a nice site for new shows at a glance this one is good too https://www.pogdesign.co.uk/cat/  It shows premiers finales etc and is colour code too.

Martin

Thanks.  That's exactly what I needed.  I had to adapt it a bit for the oddities of my programming style, and I yelled at it for quite awhile for not logging in.  I finally I tried your code unmodified and it also failed.  At which point I remembered I had never set the PIN on my dev instance to my standard pin - which I had been trying to use to login.

PEBKAC will kill you.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,394
Threads: 741
Joined: Nov 2003
#4
2020-05-26, 04:45 AM
Yeah, best to login if you can, so that the utility can be used remotely etc later.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  FM tuner support in NextPVR? Goongyae 2 288 2022-11-23, 01:22 PM
Last Post: mvallevand
  NextPVR web API for scheduling - DayMask mvallevand 28 6,469 2021-05-11, 10:07 PM
Last Post: mvallevand
  NextPVR "Service" Backend? jcole998 5 3,887 2018-05-24, 01:17 PM
Last Post: jcole998
  API access to artwork and deleting recordings cncb 29 12,433 2016-11-06, 02:20 AM
Last Post: mvallevand
  NextPVR and NRecord, between releases, updates p37307 1 2,053 2016-10-29, 01:08 AM
Last Post: sub
  How does NextPVR group recordings for XBMC? spinnaker 2 1,747 2013-11-21, 01:33 AM
Last Post: spinnaker
  Is the input file for pvrx2.exe -import unique to NextPVR? spinnaker 1 1,319 2013-10-08, 02:25 AM
Last Post: sub
  Get NextPVR data directory from outside a plugin McBainUK 3 1,600 2012-02-11, 05:42 PM
Last Post: mvallevand
  Access 'Stay on top' setting from a plugin? McBainUK 5 1,721 2011-11-07, 04:43 PM
Last Post: sub
  Resolving required plugin assemblies problem McBainUK 37 9,107 2011-10-26, 06:12 PM
Last Post: psycik

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode