如何正确使用GoDaddy v2版本API?shopperId与customerId差异问题
GoDaddy v2 API调用失败解决方案
报错根因
返回{"code": "ERROR_INTERNAL", "message": "Not Found : Failed to get customer data for customerId or shopperId xxxxxxx"}错误,是因为GoDaddy v2版本API不再支持传入10位数字格式的shopperId,必须使用UUIDv4格式的customerId作为身份标识。目前仅certificates接口文档标注了shopperId与customerId的差异,其他接口文档均未提及该规则。
获取UUID格式customerId的方法
使用可正常调用v1接口的API密钥、10位shopperId,调用v1版本GET /v1/shoppers/{10位shopperId}接口,返回结果中可直接提取到UUID格式的customerId字段。
v2接口调用注意事项
- 所有v2接口要求传入customerId的位置,统一使用上述获取到的UUID值,不得继续使用原10位shopperId
- v2接口身份鉴权规则与v1一致,请求头Authorization字段仍使用
sso-key {API Key}:{API Secret}格式 - 调用前确认接口路径前缀为
/v2/,避免与v1的/v1/前缀混淆
内容的提问来源于stack exchange,提问作者Erik Tetland
相关产品推荐
相关产品推荐

