When an Official Account calls an API, a response code for a successful request or a failed request will be returned. The developer can debug the API using the error code for troubleshooting.

Common error codes and descriptions are as follows:

Error Code Description
-1 System is busy. Try again later.
0 Request successful
40001 Incorrect AppSecret or invalid access_token. Check the accuracy of AppSecret or check whether the API is called for a proper Official Account.
40002 Invalid credential type
40003 Invalid OpenID. Check whether the OpenID (the user) has followed the Official Account or belongs to another Official Account.
40004 Invalid media file type
40005 Invalid file type
40006 Invalid file size
40007 Invalid media file ID
40008 Invalid message type
40009 Invalid image file size
40010 Invalid voice file size
40011 Invalid video file size
40012 Invalid thumbnail file size
40013 Invalid AppID. Check whether AppID is correct. Avoid unsupported characters and ensure case sensitivity.
40014 Invalid access_token. Check the validity of access_token (whether it is expired) or check whether the API is called for a proper Official Account.
40015 Invalid menu type
40016 Invalid number of buttons
40017 Invalid button type
40018 Invalid button name length
40019 Invalid button KEY length
40020 Invalid button URL length
40021 Invalid menu version
40022 Invalid sub-menu level
40023 Invalid number of sub-menu buttons
40024 Invalid sub-menu button type
40025 Invalid sub-menu button name length
40026 Invalid sub-menu button KEY length
40027 Invalid sub-menu button URL length
40028 Invalid custom menu user
40029 Invalid oauth_code
40030 Invalid refresh_token
40031 Invalid openid list
40032 Invalid openid list length
40033 Invalid request characters that are expressed in the form of \uxxxx
40035 Invalid parameter
40038 Invalid request format
40039 Invalid URL length
40048 Invalid URL
40050 Invalid group ID
40051 Invalid group name
40060 The specified article_idx is invalid when deleting an article
40117 Invalid group name
40118 Invalid media_id size
40119 Invalid button type
40120 Invalid sub-button type
40121 Invalid media_id type
40125 Invalid appsecret
40132 Invalid Weixin ID
40137 Invalid image format
40155 Do not add a link to the homepage of another Official Account
40163 The oauth_code is already used
41001 Parameter access_token is missing
41002 Parameter appid is missing
41003 Parameter refresh_token is missing
41004 Parameter secret is missing
41005 Media file data is missing
41006 Parameter media_id is missing
41007 Sub-menu data is missing
41008 oauth code is missing
41009 openid is missing
42001 access_token expired. Check the validity period of access_token. See Get access_token API in Basic Support for details.
42002 refresh_token expired
42003 oauth_code expired
42007 Both access_token and refresh_token became invalid because the user modified the Weixin password. Re-authorization is required.
43001 Use GET method
43002 Use POST method
43003 Use HTTPS method
43004 Recipient is not a follower
43005 Recipient is not a friend
43019 Recipient is in the blacklist
44001 Empty media file
44002 Empty POST data packet
44003 Empty article
44004 Empty text message
45001 Media file size exceeds the limit
45002 Message length exceeds the limit
45003 Title length exceeds the limit
45004 Description length exceeds the limit
45005 URL length exceeds the limit
45006 Image URL length exceeds the limit
45007 Voice file playback timed out
45008 Article length exceeds the limit
45009 API calls exceed the limit
45010 The number of menus created exceeds the limit
45011 API is called at a high frequency. Try again later.
45015 Response timed out
45016 System groups cannot be modified
45017 Group name exceeds the limit
45018 The number of groups exceeds the limit
45047 The number of downstream customer service messages exceeds the limit
46001 Media data does not exist
46002 Menu version does not exist
46003 Menu data does not exist
46004 User does not exist
47001 An error occurred while parsing JSON/XML content
48001 Unable to access the API. Check whether the Official has access to the API. See API permissions in the Official Accounts Platform > Developer Center.
48002 Message rejected by the follower (Receive Messages in the setting options of the Official Account is disabled by the follower)
48004 API is suspended. Log in to mp.weixin.qq.com for details.
48005 Assets that are referenced by auto replies and custom menus cannot be deleted via API
48006 Number of calls cannot be cleared via API because the number of clears exceeds the limit
48008 No permission to send this type of message
50001 The user is not authorized to use this API
50002 The user permission is limited probably because the API is suspended due to unauthorized operation
50005 The user has not followed the Official Account
61451 Invalid parameter
61452 Invalid kf_account
61453 kf_account already exists
61454 kf_acount length exceeds the limit of 10 characters, excluding @ and the Weixin ID of the Official Account after @.
61455 kf_acount name contains invalid characters (only letters and numbers are allowed)
61456 The number of kf_accounts exceeds the limit of 10
61457 Invalid profile photo file type
61450 System error
61500 Date format error
63001 Empty parameter
63002 Invalid signature
65301 No personalized menu corresponding to this menuid exists
65302 No appropriate user exists
65303 Cannot create personalized menus without the default menu
65304 Empty MatchRule
65305 The number of personalized menus is limited
65306 This account does not support personalized menus
65307 Personalized menu information is empty
65308 There is a button with no response type
65309 Personalized menu is disabled
65310 Country is required if province and city are specified
65311 Province is required if city is specified
65312 Invalid country information
65313 Invalid province information
65314 Invalid city information
65316 Up to 3 external redirect URLs can be set in the Official Account menu
65317 Invalid URL
87009 Invalid signature
9001001 Invalid POST data parameter
9001002 Unavailable remote service
9001003 Invalid ticket
9001004 Failed to get the user information via Shake Nearby
9001005 Failed to get the merchant information
9001006 Failed to get the OpenID
9001007 Uploaded file is missing
9001008 The file type of uploaded asset is invalid
9001009 The file size of uploaded asset is invalid
9001010 Upload failed
9001020 Invalid account
9001021 There is a device with an activation rate of less than 50%. Cannot add a new one.
9001022 The number of devices requested must be greater than 0
9001023 The application for the device ID is already under review
9001024 Up to 50 device IDs can be queried at a time
9001025 Invalid device ID
9001026 Invalid page ID
9001027 Invalid page parameter
9001028 Up to 10 page IDs can be delete at a time
9001029 The page has been linked to the device. It cannot be deleted unless unlinked from the device.
9001030 Up to 50 page IDs can be queried at a time
9001031 Invalid time period
9001032 The parameter used to save the linking relationship between device and page is invalid
9001033 Invalid shop ID
9001034 Device remarks exceed the limit
9001035 Invalid device application parameter
9001036 Invalid begin value