Do we need API key for just playing a video in the YouTube Player API in Android?

Viewed 1566

I am using the YouTube Android Player API to play youtube videos with hardcoded urls within app. That's all I am doing. I am not querying for any ratings, comments information from YouTube.

If this is the case, do I still need a valid YouTube API key? I tried with a dummy key "asdfasdfasdf" and it worked. The video plays in the player in my app.

There is no mention of when an API key is needed in the official documentation. Can I go ahead and release the app in store, or do I still need a valid key? Has anyone experimented with a dummy key?

2 Answers

You should get the API keys because you cannot rule out any of the following happening:

  1. Google could reject your app when you submit it to the Play Store.
  2. Your app may break. Just because it's working now doesn't mean it will continue to work in the future.
  3. Google could suspend your account.

I'm sure you've already found this referece to the YouTube Android Player API, and more specifically the information about Registering you application.

I'd definitely suggest you register your application for a proper API key before submitting to Play Store.

I can't think of any reason as to why you are able to play videos in your app. Maybe you are running debug mode and the YouTube API somehow allows this? Have you tried running a release build of your application to see if you are still able to play the videos without a proper API key?

Related