Google Drive Links URL format and query parameters

后端 未结 3 1715
半阙折子戏
半阙折子戏 2020-12-31 10:08

I\'m desperately trying to find where the google drive and google docs urls scheme and query parameters are documented. For example what is the usp= parameter which seems to

3条回答
  •  再見小時候
    2020-12-31 10:43

    As the part about /u/2/ has already been satisfactorily explained, I'll try to explain the part about usp from my best understanding.

    It seems to just be providing data on from where you got access to the document.

    usp=docs_home is when you create a new document from Google Docs itself
    usp=drivesdk is given when you get a link using the Drive SDK
    usp=sharing is when you get a link from the sharing dialogue
    usp=drive_web is what you get when you click on a document in the Docs homepage or in Drive usp=direct_url is seen on the Docs homepage when you directly go to sheets.google.com or slides.google.com

    There are probably more to be found, but it doesn't seem to be doing anything other than likely providing referrer information. Replacing usp=sharing with anything else still doesn't seem to stop you from retrieving a document, and it seems unlikely that this would be a document-specific property as it is also seen on other Google URLs, like the slides/sheets homepage.

提交回复
热议问题