在调用微信公众号预览接口【订阅号与服务号认证后均可用】时,报错:errcode:40132,errmsg:invalid username rid: 60dac95d-5c42d192-50f09436 的排查分析

1、查看开发文档,预览接口【订阅号与服务号认证后均可用】。如图1

查看开发文档,预览接口【订阅号与服务号认证后均可用】

图1

2、实际调用后,响应报错:errcode:40132,errmsg:invalid username rid: 60dac95d-5c42d192-50f09436。

Array
(
     => 200
    [status] => OK
    [responseline] => HTTP/1.0 200 OK
    [headers] => Array
        (
            [Connection] => close
            [Content-Type] => application/json; encoding=utf-8
            [Date] => Tue, 29 Jun 2021 07:18:54 GMT
            [Content-Length] => 77
        )

    [content] => {"errcode":40132,"errmsg":"invalid username rid: 60dac95d-5c42d192-50f09436"}
    [meta] => HTTP/1.0 200 OK
Connection: close
Content-Type: application/json; encoding=utf-8
Date: Tue, 29 Jun 2021 07:18:54 GMT
Content-Length: 77

{"errcode":40132,"errmsg":"invalid username rid: 60dac95d-5c42d192-50f09436"}
)

3、查看返回码说明,原因为:微信号不合法。如图2

查看返回码说明,原因为:微信号不合法。

图2

4、查看请求参数,touser=13980000000,即手机号。如图3

查看请求参数,touser=13980000000,即手机号。

图3

5、修改请求参数,touser=shuijingsewwwwqnwq66tt,即微信号。响应成功。如图4

修改请求参数,touser=shuijingsewwwwqnwq66tt,即微信号。响应成功。

图4

Array
(
     => 200
    [status] => OK
    [responseline] => HTTP/1.0 200 OK
    [headers] => Array
        (
            [Connection] => close
            [Content-Type] => application/json; encoding=utf-8
            [Date] => Tue, 29 Jun 2021 07:31:01 GMT
            [Content-Length] => 40
        )

    [content] => {"errcode":0,"errmsg":"preview success"}
    [meta] => HTTP/1.0 200 OK
Connection: close
Content-Type: application/json; encoding=utf-8
Date: Tue, 29 Jun 2021 07:31:01 GMT
Content-Length: 40

{"errcode":0,"errmsg":"preview success"}
)

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/181655.html

(0)
上一篇 2021年11月1日
下一篇 2021年11月1日

相关推荐

发表回复

登录后才能评论