Add comment on YouTube for video from iPhone app

| | August 7, 2015

How can I programmatically add comments to a YouTube video from an iPhone app? I’ve searched Google and gone through the YouTube Api but haven’t found any help.

One Response to “Add comment on YouTube for video from iPhone app”

  1. Adding comment using Youtube API

    Adding a comment in response to a video
    To add a comment to a video, send a POST request to the URL identified in the tag that appears inside the tag. The actual comment that you are submitting appears as the value of the tag in the XML that constitutes the body of the POST request.
    The sample XML API request below demonstrates how to add a comment to a video.

    POST /feeds/api/videos/VIDEO_ID/comments HTTP/1.1
    Content-Type: application/atom+xml
    Content-Length: CONTENT_LENGTH
    Authorization: AuthSub token="AUTHORIZATION_TOKEN"
    GData-Version: 2
    X-GData-Key: key=DEVELOPER_KEY

    <?xml version="1.0" encoding="UTF-8"?>
    <entry xmlns=""
      <content>This is a crazy video.</content>

    construct that xml and send via POST. Get Developer_key, get the VIDEO_ID of the youtube video.

    Using a developer key:
    A developer key uniquely identifies a product that is submitting an API request. Please visit to obtain a developer key.

    VideoID – The YouTube video ID that uniquely identifies the video.
    I think videoid for a youtube video is NWHfY_lvKIQ

Leave a Reply