Wednesday, February 29, 2012

[YouTube-API] Getting Insight/Analytic CSV Zip with OAuth/OAuth2 API

Hello,

I want to download automatically the statistics of the channels and videos of our customer.
Therefore I use a ruby library (oauth / oauth-plugin) to get a temporarily access token for the download process.

* I have created a project on https://code.google.com/apis/console
* I use the client key and secret to get a youtube authorization for this project (with oauth1 protocol because of problems with the library and oauth2)
* now I have consumer tokens in my database like 1/ykeB9Zjb-eoysRePnuBnoZmwD5AckpSBbqJxco-K8T4 and a secret

With this information I want to generate an access token to use it to download the insight files.

If I download the files directly I get a Link with a token parameter:

http://insight.youtube.com/video-analytics/csvreports?query=xxxx&type=v&starttime=1327968000000&endtime=1330473600000&user_starttime=1327968000000&user_endtime=1330473600000&region=world&token=XXXXXXXXXXXXXXXXXXXXXXXX&hl=en_US

What is this token exactly? Is it correct that I must get an access token with my request token, I got from the oauth authorising a request token step?
The next problem is, that I must know the access token to put it in the insight download request. But I never see this token.

I didn't understand this. Can someone help me?

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/MlN_9UfVodMJ.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment