来自 Shopee 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 Sandbox V2 Frequently Asked Questions
Sandbox V2 Frequently Asked Questions
Q: What can a developer do in the sandbox environment?
A: The sandbox environment is a testing environment provided by Open Platform for developers. It offers various types of test accounts and data, enabling developers to complete testing for most API scenarios within the sandbox. The sandbox provides functionality that is largely consistent with the live environment but covers only core scenarios, such as product management, order management, logistics shipping, etc.
For specific support details of the sandbox environment, please refer to: https://open.shopee.com/developer-guide/644.
Q: Sandbox login page error: What should I do if I can't log in?
A: First, troubleshoot the issue yourself by following these steps:
-
Ensure you are using sandbox environment credentials, not live shop account credentials. Use the sandbox environment account found under Console >>> Test Account - Sandboxv2.
-
Verify the account and site match (e.g., logging into an SG site with a TW account).
-
Confirm the account credentials are entered correctly.
If the above steps fail to resolve the issue or if any of the following error scenarios occur, please submit a support ticket for assistance.
- After multiple attempts, I still cannot log in, and the page displays an error.
- The login page shows an error, and refreshing multiple times still fails to grant access.
- Numerous error messages appear after logging in, affecting normal usage.
- Even after clearing browser cookies, I cannot access the sandbox environment, with error logs appearing in both frontend and backend systems.
Q: Sandbox test shop authorization/login requires entering a verification code. What is the verification code?
A: The universal verification code required for authorization/login in the test environment's test shop is: 123456.
Q: How many test accounts can be created in the sandbox testing environment?
A: On Shopee Open Platform > Console > Tools > Test Account-Sandbox v2, create up to 8 Local test accounts, 3 Merchant test accounts, and 3 Supplier test accounts.
Q: The API returned an error code: "invalid partner_id"
A: "invalid partner_id" Errors commonly occur in the following scenarios:
- Invalid or non-existent partner_id
If the partner_id provided in the request is incorrect or not registered on the Shopee platform, an "invalid partner_id" error will be returned. Ensure the partner_id is obtained from the Shopee Open Platform console and entered accurately.
- Incorrect Request URL
Sometimes, even if the partner_id is correct, this error may occur if the requested URL path or environment (such as sandbox/test-stable/live) is incorrect. For example, if an incorrect API path or environment is used, the system cannot recognize the partner_id.
- partner_id parameter type error
If the partner_id parameter type is incorrect (e.g., a string is passed when an integer is required), an error will also be reported. For example, the API may return "error params, partner_id parameter type is wrong".
- Invalid request content type or parameter format
If the content-type is set incorrectly, or if parameters are not placed in the body/json as required, this may also cause authentication to fail, resulting in an invalid partner_id error.
- partner_id and shop_id has no link
In certain API (such as obtaining an access_token), if the partner_id is not associated with the shop_id, related errors may also occur.
6. Other Special Circumstances
This error may also occur if you call a Live environment partner_id in a test environment (test-stable), or if the partner_id has been disabled.
Test Partner_id and Test Partner key can be obtained from the App list and APP Detail pages:
Q: Why can't I get a tracking number when I've shipped according to the shipping requirements?
A:
Possible reasons include:
-
After an order is shipped, if it exceeds channel restrictions (such as price, package weight, dimensions, etc.), you can use
/api/v2/logistics/get_channel_listto retrieve channel-level restrictions. -
3PL order placement failed; a support ticketmust be submitted for resolution.
-
System delays may occur, and some sites may take time to respond. If no response is received after an extended period(Recommended waiting time: 3 hours), please submit a support ticket for assistance.
-
System internal error, please submit a support ticket for assistance.
Note: If you require additional features supported by the sandbox environment, please submit a support ticketdetailing your specific use case and requirements.
Sandbox V2 常见问题
Q:我可以在沙箱环境做什么
A:沙箱环境是Open Platform提供给开发者的测试环境,提供了多种类型的测试账号与数据,开发者可以在沙箱环境完成大部分API场景的测试工作,沙箱提供了与线上基本一致的功能,但只覆盖核心场景,例如:商品管理、订单管理、物流发货等。
沙箱环境具体支持情况请参考:https://open.shopee.com/developer-guide/644
Q:沙箱登陆页面报错,无法登录怎么办?
A:先按照以下流程自行排查
-
确认使用的是沙箱环境账号密码,而不是live shop account。请使用Console >>> Test Account - Sandboxv2中的沙箱环境账号
-
确认账号站点匹配(例如使用TW account 登陆SG site)
-
确认账号密码输入正确
若以上操作无法解决,或者出现下述错误场景,请提交工单处理
- 多次尝试后依然无法登录,页面提示错误。
- 登录页面报错,刷新多次依旧无法进入。
- 登录后出现大量报错信息,影响正常使用。
- 清除浏览器Cookie后仍无法访问沙箱环境,前后端均有报错日志。
Q:Sandbox测试店铺授权/登陆需要输入验证码,验证码是多少?
A:测试环境的测试店铺授权/登陆时需要输入的验证码通用为:123456。
Q:沙箱测试环境最多可以建立几个测试账号?
A:在Shopee Open Platform>Console>Tools>est Account-Sandbox v2 建立最多8个Local测试账号,3个Merchant 测试账号,3个Supplier 测试账号
Q:接口返回报错: "invalid partner_id"
A: "invalid partner_id" 报错常见于以下几种场景:
- partner_id 填写错误或不存在
如果请求中填写的 partner_id 不正确,或者该 ID 并未在 Shopee 平台注册,就会返回 "invalid partner_id" 错误。请确保 partner_id 是在 Shopee Open Platform 控制台中获取的,并且填写无误。
2. 请求 URL 使用错误
有时即使 partner_id 正确,但如果请求的 URL 路径或环境(如 sandbox/test-stable/live)不对,也会导致该报错。例如,使用了错误的 API 路径或环境,系统无法识别 partner_id。
- partner_id 参数类型错误
如果 partner_id 参数类型不对(如应为整数却传了字符串),也会报错。例如,API 返回 "error params, partner_id parameter type is wrong"。
- 请求内容类型或参数格式错误
如 content-type 设置不正确,或参数未按要求放在 body/json 中,也可能导致鉴权失败,进而报 invalid partner_id。
- partner_id 与 shop_id 未绑定
在某些接口(如获取 access_token)中,如果 partner_id 与 shop_id 没有关联关系,也可能出现相关报错。
6. 其他特殊情况
如在测试环境(test-stable)调用生产环境的 partner_id,或 partner_id 已被禁用等,也可能出现该错误。
Test Partner_id 和Test Partner key可从App list以及APP Detail页面获取:
Q:为什么我按照发货条件发货,却无法拿到tracking_number?
A:
可能有以下原因:
1.订单发货后超出了channel 限制(价格,包裹重量,尺寸等),可以通过/api/v2/logistics/get_channel_list 获取channel level的限制。
2.3pl下单失败,需要提交工单处理。
3.系统延迟,部分站点需要等待一段时间后才会返回。若长时间未返回(建议等待3h),提交工单处理。
- System internal error,需要提交工单处理。
Note :如果有更多需要沙箱支持的功能,请提工单反馈您的具体使用场景和诉求
