有没有人尝试通过 oauth2client.client 获得 google play 或任何 google api?有些,我写了下一段代码:
import httplib2
import requests
from oauth2client.client import flow_from_clientsecrets
flow = flow_from_clientsecrets('path_to_dir\\client_secret.json',
scope = 'https://www.googleapis.com/auth/androidpublisher',
redirect_uri='')
auth_uri = flow.step1_get_authorize_url()
credentials = flow.step2_exchange(code)
http = httplib2.Http()
http = credentials.authorize(http)
我想知道如何获取代码参数?错误是:
NameError: name 'code' is not defined
以及如何调用所选api的任何方法?