Youtube Data API - How to avoid Google OAuth redirect URL authorization

后端 未结 1 1063
后悔当初
后悔当初 2020-12-31 18:39

Requirement: I am trying to upload videos to my Youtube channel through Youtube Data API for Java. The request is sent from a war file hosted on tomcat cont

相关标签:
1条回答
  • 2020-12-31 19:33

    You should only need to authenticate your code once. When your code is authenticated you get a refresh token back. the refresh token will then allow you to get a new access token the next time your code runs.

    There is no service account authentication for the YouTube api. Your code has to be authenticated by you the first time in order to get that refresh token.

    I am not a java programmer but from a quick check of the documentation it looks quite similar to what I do in.net. You need to create a datastore to to store the first refreshh token then you should be able to run your code in the future with out needing to authenticate it again.

    0 讨论(0)
提交回复
热议问题