2

I would like to download some data from Snapchat publisher dashboard using GAS. The problem I have is that the page can only be accessed after Google authentication (OAuth2?) and thus cannot be done using the HTTP request scripts I saw on SO. The website I want to access is here: https://publish.snapchat.com/

The data that interest me are pictures and CSV files that can be dowloaded via a "export CSV" button, even though pictures are my priority.

The only obstacle I see is the "sign in with Google" thing, that creates a pop up page to log in the Google account, and of course there is no other way to sign in for this web site.

il_Cozzimo
  • 112
  • 3
  • 11
  • 1
    You need to use OAuth2 authentication. HTTP won't work here – Darpan Sanghavi Apr 18 '18 at 09:39
  • Try the [SO post](https://stackoverflow.com/questions/21621019/google-apps-script-login-to-website-with-http-request). It was elaborated the step by step process to log-in to the website and get a session cookie, see the answer section for code. The second part of the answer is more on verification if you have successfully logged-in to the website. Also, [this tutorial](http://scraping.pro/scrape-google-app-script/) have sample code for web scraping process that could be helpful as well. See also [this SO post](https://stackoverflow.com/questions/38676576/web-scraping-with-google-apps-script) – MαπμQμαπkγVπ.0 Apr 18 '18 at 11:14
  • I just added some information on the problem. OAuth seems to be the right thing to look at, but its documentation is focused on how to integrate it to an app, so that is not relevant in my case... – il_Cozzimo Apr 20 '18 at 10:00

0 Answers0