组合模板并添加至帐号下的个人模板库
@since 2.8.18
@param access_token access_token
@param id 模板标题id，可通过接口获取，也可登录小程序后台查看获取
@param keyword_id_list 开发者自行组合好的模板关键词列表，关键词顺序可以自由搭配（例如[3,5,4]或[4,5,3]），最多支持10个关键词组合
@return result
347925
public static TemplateAddResult templateAdd(String access_token,String id,List<Integer> keyword_id_list){
		String json = String.format("{\"id\":\"%s\",\"keyword_id_list\":%s}", id,JsonUtil.toJSONString(keyword_id_list));
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(jsonHeader)
				.setUri(BASE_URI+"/cgi-bin/wxopen/template/add")
				.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
				.setEntity(new StringEntity(json,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest,TemplateAddResult.class);
	}
934082
public static MaterialGetResult get_material(String access_token,String media_id){
		HttpUriRequest httpUriRequest = RequestBuilder.post()
					.setHeader(jsonHeader)
					.setUri(BASE_URI+"/cgi-bin/material/get_material")
					.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
					.setEntity(new StringEntity("{\"media_id\":\""+media_id+"\"}",Charset.forName("utf-8")))
					.build();
		return LocalHttpClient.execute(httpUriRequest,BytesOrJsonResponseHandler.createResponseHandler(MaterialGetResult.class));
	}
1168347
public function getOauthAuth($access_token, $openid)
    {
        $result = Tools::httpGet(self::API_BASE_URL_PREFIX . self::OAUTH_AUTH_URL . "access_token={$access_token}&openid={$openid}");
        if ($result) {
            $json = json_decode($result, true);
            if (empty($json) || !empty($json['errcode'])) {
                $this->errCode = isset($json['errcode']) ? $json['errcode'] : '505';
                $this->errMsg = isset($json['errmsg']) ? $json['errmsg'] : '无法解析接口返回内容！';
                Tools::log("WechatOauth::getOauthAuth Fail.{$this->errMsg} [{$this->errCode}]", "ERR - {$this->appid}");
                return false;
            } elseif (intval($json['errcode']) === 0) {
                return true;
            }
        }
        return false;
    }
98663
protected static function cgi_user_get_uri($access_token,$next_openid){
        $param = [
            'access_token' => $access_token,
            'next_openid'  =>$next_openid
        ];
        return self::CGI_USER_GET_URI.http_build_query($param);

    }
764938
def get_id_token(self, access_token, nonce):
        

        claims_string = self.request.POST.get('claims')
        claims_request = json.loads(claims_string) if claims_string else {}

        return oidc.id_token(access_token, nonce, claims_request)
686469
def get_access_token(client_id, client_secret):
	'''
	
	'''

	headers = {'Content-Type': 'application/x-www-form-urlencoded'}
	payload = {
		'client_id': client_id,
		'client_secret': client_secret
	}

	request = requests.post(token_url, data=payload, headers=headers)
	if request.status_code == 200:
		token = request.json()
		return token

	return {'status': request.status_code, "message": request.text}
1073417
def check_access_token(self, openid=None, access_token=None):
        
        openid = openid or self.open_id
        access_token = access_token or self.access_token
        res = self._get(
            'sns/auth',
            params={
                'access_token': access_token,
                'openid': openid
            }
        )
        if res['errcode'] == 0:
            return True
        return False
230940
public static KFAccount getkflist(String access_token) {
		HttpUriRequest httpUriRequest = RequestBuilder.get()
				.setHeader(jsonHeader)
				.setUri(BASE_URI + "/cgi-bin/customservice/getkflist")
				.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
				.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest, KFAccount.class);
	}
1242978
protected static function userinfo_uri($access_token, $openid, $lang = 'zh_CN')
    {
        $param = [
            'access_token' => $access_token,
            'openid' => $openid,
            'lang' => $lang,
        ];

        return self::USERINFO_URI . http_build_query($param);
    }
180847
def access_token_response_data(self, access_token, response_type=None, nonce=''):
        

        # Clear the scope for requests that do not use OpenID Connect.
        # Scopes for pure OAuth2 request are currently not supported.
        scope = constants.DEFAULT_SCOPE

        extra_data = {}

        # Add OpenID Connect `id_token` if requested.
        #
        # TODO: Unfourtunately because of how django-oauth2-provider implements
        # scopes, we cannot check if `openid` is the first scope to be
        # requested, as required by OpenID Connect specification.

        if provider.scope.check(constants.OPEN_ID_SCOPE, access_token.scope):
            id_token = self.get_id_token(access_token, nonce)
            extra_data['id_token'] = self.encode_id_token(id_token)
            scope = provider.scope.to_int(*id_token.scopes)

        # Update the token scope, so it includes only authorized values.
        access_token.scope = scope
        access_token.save()

        # Get the main fields for OAuth2 response.
        response_data = super(AccessTokenView, self).access_token_response_data(access_token)

        # Add any additional fields if OpenID Connect is requested. The order of
        # the addition makes sures the OAuth2 values are not overrided.
        response_data = dict(extra_data.items() + response_data.items())

        return response_data
579020
protected static function cgi_userinfo_uri($access_token, $openid, $lang = 'zh_CN')
    {
        $param = [
            'access_token' => $access_token,
            'openid' => $openid,
            'lang' => $lang,
        ];

        return self::CGI_USERINFO_URI . http_build_query($param);
    }
124158
public static GetAllPrivateTemplateResult templateGet_all_private_template(String access_token) {
        HttpUriRequest httpUriRequest = RequestBuilder.post()
                .setUri(BASE_URI + "/cgi-bin/template/get_all_private_template")
                .addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
                .build();
        return LocalHttpClient.executeJsonResult(httpUriRequest, GetAllPrivateTemplateResult.class);
    }
250375
private IdentifierToken eatIdOrKeywordAsId() {
    Token token = nextToken();
    if (token.type == TokenType.IDENTIFIER) {
      return (IdentifierToken) token;
    } else if (Keywords.isKeyword(token.type)) {
      return new IdentifierToken(
          token.location, Keywords.get(token.type).toString());
    } else {
      reportExpectedError(token, TokenType.IDENTIFIER);
    }
    return null;
  }
263661
def get_event_access_codes(self, id, **data):
        
        
        return self.get("/events/{0}/access_codes/".format(id), data=data)
566974
def get_application_access_token(application_id, application_secret_key, api_version=None):
    
    graph = GraphAPI(version=api_version)

    response = graph.get(
        path='oauth/access_token',
        client_id=application_id,
        client_secret=application_secret_key,
        grant_type='client_credentials'
    )

    try:
        data = parse_qs(response)

        try:
            return data['access_token'][0]
        except KeyError:
            raise GraphAPI.FacebookError('No access token given')
    except AttributeError:  # api_version >= 2.3 returns a dict
        return response['access_token'], None
404145
public ExtendedSwidProcessor setKeywords(final String... keywordList) {
        KeywordsComplexType kct = new KeywordsComplexType();
        if (keywordList.length > 0) {
            for (String keyword : keywordList) {
                kct.getKeyword().add(new Token(keyword, idGenerator.nextId()));
            }
        }
        swidTag.setKeywords(kct);
        return this;
    }
430463
def token(self, id, **kwargs):
        
        data = self.get('tokens', id, **kwargs)
        return data