PDF Path

tryp's Avatar

tryp

05 Jun, 2011 08:35 AM via web

trying to get the path to files.

i tried to get a path to a pdf using the API.

I tried stream_url and i tried stream_url+token neither of them worked

I also tried download_url and download_url + token

all the above returned 401

how would sugest i get access to the pdf?

thx

  1. 2 Posted by tunix on 06 Jun, 2011 11:40 AM

    tunix's Avatar

    Hello tryp,

    Sorry for the late reply. I've just uploaded a PDF file to my put.io account
    and tried to retrieve its download url. Please take a look at the following
    example:

    In [7]: a = putio.Api("XXXXXXX", "XXXXXXX")
    In [8]: x = a.get_items(id = 17536822)[0]

    In [11]: x.get_download_url()
    Out[11]: u'http://put.io/download-file/140/17536822'

    In [12]: x.get_stream_url()
    Out[12]: u'
    http://frd04.put.io/stream-file/140/17536822/atk/bb21ae900ca5ee9521d73e4826286054ebb05901
    '

    ---
    Quis custodiet ipsos custodes?

  2. 3 Posted by tryp on 06 Jun, 2011 01:09 PM

    tryp's Avatar

    i can get both those urls but when i try and request them i get a 401.

    i tried adding the token you are menat to use for the video but that didn't work.

    is there a special token for the pdfs and files?

  3. Support Staff 4 Posted by aybars.badur on 06 Jun, 2011 02:20 PM

    aybars.badur's Avatar

    Hi tryp,

    No, theres nothing special about pdfs but if you are getting a 401 it may be because of two reasons,
    i. token is wrong
    ii. the token is not for the requesting ip, we generate the token for the logged in user, and we don't allow the same request from another ip.

    hope this information helps debugging, please let me know if you have further questions.

  4. aybars.badur closed this discussion on 06 Jun, 2011 02:20 PM.

Comments are currently closed for this discussion. You can start a new one.