Heim  >  Artikel  >  Backend-Entwicklung  >  微信开放平台全网发布61009错误

微信开放平台全网发布61009错误

WBOY
WBOYOriginal
2016-06-20 12:38:061565Durchsuche

{"errcode":61009,"errmsg":"code is invalid hint: [xIoCVA0808vr21]"} 
这个61009错误是什么意思 api里没有说明
现在全网发布就差这最后一个错误了
如能解决100分全给你


回复讨论(解决方案)

全网发布的是吧   
我这几天也是遇到这个问题   是按照微信接口的要求获取code然后赋值的 也是遇到这个问题 

1)微信模推送给第三方平台方:文本消息,其中Content字段的内容固定为: QUERY_AUTH_CODE:$query_auth_code$(query_auth_code会在专用测试公众号自动授权给第三方平台方时,由微信后台推送给开发者)

2)第三方平台方拿到$query_auth_code$的值后,通过接口文档页中的“使用授权码换取公众号的授权信息”API,将$query_auth_code$的值赋值给API所需的参数authorization_code。然后,调用发送客服消息api回复文本消息给粉丝,其中文本消息的content字段设为:$query_auth_code$_from_api(其中$query_auth_code$需要替换成推送过来的query_auth_code)

嗯 我的也遇到这样后来解决了
问题是这样解决的   发现有点坑爹   他这两个接口要求的code取值不一样

第三方平台方拿到$query_auth_code$的值后,通过接口文档页中的“使用授权码换取公众号的授权信息”API,将$query_auth_code$的值赋值给API所需的参数authorization_code。
上面这段话的接口  要使用xml解析出来的 我是这样做的
PHP code


$AuthorizationCode = $xml->getElementsByTagName('AuthorizationCode')->item(0)->nodeValue;  

把这个获取到的code传到API接口上


然后,调用发送客服消息api回复文本消息给粉丝,其中文本消息的content字段设为:$query_auth_code$_from_api(其中$query_auth_code$需要替换成推送过来的query_auth_code)
然后这个客服的code呢 就使用他 说的这个方法去截取 
PHP code

trim(str_replace("QUERY_AUTH_CODE:","",$rec_words))


我是php代码写的   大家参考下 
如果还是不明白  可以加我微信 qiufeng2983  我再给你们回复吧

问题已经解决
第三方平台方拿到$query_auth_code$的值后,通过接口文档页中的“使用授权码换取公众号的授权信息”API,将$query_auth_code$的值赋值给API所需的参数authorization_code。然后,调用发送客服消息api回复文本消息给粉丝,其中文本消息的content字段设为:$query_auth_code$_from_api(其中$query_auth_code$需要替换成推送过来的query_auth_code)

注意:这一步authorization_code要用每10分钟接收到的消息里面if ($data['InfoType'] == 'authorized')授权消息体里的AuthorizationCode而不是$query_auth_code截取后的
https://api.weixin.qq.com/cgi-bin/component/api_query_auth?component_access_token=' . $result['component_access_token'];//
$data = array('component_appid' => option('config.wx_appid'), 'authorization_code' => $auth_code);

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn