i had implemented the following code from the google docs ...
-*- coding: utf-8 -*-Sample Python code for youtube.playlists.insertSee 
instructions for running these code samples locally:
https://developers.google.com/explorer-help/guides/code_samples#python

import os

import google_auth_oauthlib.flow

import googleapiclient.discovery

import googleapiclient.errors

scopes = ["https://www.googleapis.com/auth/youtube.force-ssl";]

def main():
Disable OAuthlib's HTTPS verification when running locally.*DO NOT* leave 
this option enabled in production.

os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"

api_service_name = "youtube"

api_version = "v3"

client_secrets_file = "YOUR_CLIENT_SECRET_FILE.json"
Get credentials and create an API client

flow = google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file(

client_secrets_file, scopes)

credentials = flow.run_console()

youtube = googleapiclient.discovery.build(

api_service_name, api_version, credentials=credentials)

request = youtube.playlists().insert(

part="snippet,status",

body={

"snippet": {

"title": "Sample playlist created via API",

"description": "This is a sample playlist description.",

"tags": [

"sample playlist",

"API call"

],

"defaultLanguage": "en"

},

"status": {

"privacyStatus": "private"

}

}

)

response = request.execute()

print(response)

if *name* == "*main*":

main()

after going to the link, they were asking for some authorization code......

this error is coming whats the issue...

ERROR: redirect_uri_mismatch....

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/7f9740b7-d20b-4de8-a0a7-b238a2d8c23c%40googlegroups.com.

Reply via email to