If you are getting a 200 response - then the request has succeeded without any errors - therefore this is more about handilng the response from the google api.
-- You will need to look at the google api docs to see what is returned by the REST endpoint.
This is not a django issue, but more how to read information from google drive api. I would suggest you either search for the information or post on stackoverflow, or search the google api forums.
Regards,
Andréas
2018-08-17 14:39 GMT+02:00 madhusona <madhusona@gmail.com>:
--In
DjangoI implemented social login using the social auth app and I followed this link to configure it.Goolge OAuthis working good;google-oauth2access token is stored in extra data field.Now I want to list google drive files using this access token. I tried with this.
def drive(request): user = request.user social = user.social_auth.get(provider='google-oauth2' ) response = requests.get( 'https://www.googleapis.com/auth/drive.metadata.readonly ', params={'access_token': social.extra_data['access_token' ]}) print(response) return render(request, 'home/drive.html', {'checking':response})I am getting a
200response, but I don't know how to list files.I'm using
django 2.0.3andpython 3.5.
HiAm trying to implement Google API client for Django. I am following the link https://developers.google.com/api-client-library/python but it was not working. Amusing python 3.5 and Django 2.0. It is very helpful if there is a new user manual to implement Django google API client./guide/django
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7f7ff58d- .2895-496a-ada1-d255d5f6ccf6% 40googlegroups.com
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK4qSCcEuT_3Dio7Q0wR%2BZVwj-YUwTwjsCPEs_kKBj1Cow3%2BjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment