issue sign invalid in call api use postman

Discussing technical aspects of Yun development products, including IoT Core and other cloud service APIs, data analysis products, etc.


Post Reply
namp
Posts: 7

I am using the postman to call the api {{url}}/v1.0/token?grant_type=1 from cloudservice, but I still get the sign_invalid error.My url:https://openapi.tuyacn.com. I followed the steps in this tutorial link. https://developer.tuya.com/en/docs/iot/ ... o385w1svns. Create cloud service and transmit clientid,secretid but it still tells me sign_invalid.
Error postman:{
"code": 1004,
"msg": "sign invalid",
"success": false,
"t": 1698056060495,
"tid": "ee733d47718c11eeb7838e9525701b2a"
}
My current account has just been created and activated the free cloudService api package. I am in Vietnam.I did it wrong there What steps? Can anyone help me answer this question? I can't call this api success.Help me !

JamesG
Posts: 47

Re: issue sign invalid in call api use postman

Hi,
we have reviewed your request and found that some parameters are missing, such as clientid. Have you already created a project on the cloud development platform? If you have created a project, you can find the AccessID and AccessSecret on the platform after entering the project page, which correspond to the Clientid and Secret environment variables in the Postman tool.

namp
Posts: 7

Re: issue sign invalid in call api use postman

Thank You !Can I ask one more question? Is there a way for me to call the api on postman. But can I fake the ip address of china? Because my ip address is in Vietnam.This is error :
{
"code": 2007,
"msg": "your ip(xxx.xx.xxx.xxx) cross-region access is not allowed",
"success": false,
"t": 1698112435222,
"tid": "3061832a721011eeaf4c86d504bf6b23"
}

JamesG
Posts: 47

Re: issue sign invalid in call api use postman

Hi,

due to security restrictions in different regions, currently the API services of Chinese data centers can only be accessed by Chinese IPs, and the API services of overseas data centers can only be accessed by overseas IPs.
If you are in Vietnam, you can access the Western America Data Center at https://developer.tuya.com/en/docs/iot/ ... -Endpoints.
By the way, when you start creating a developer project, please select the Western America Data Center as your data center.

namp
Posts: 7

Re: issue sign invalid in call api use postman

Thank you ! I called the api to receive the token successfully!

aaron.alva
Posts: 1

Re: issue sign invalid in call api use postman

I have a similar error but I don't know what could be generating it and I always have the same error
"
{
"code": 1004,
"msg": "sign invalid",
"success": false,
"t": 1716931843584,
"tid": "89e841561d3911efb9130e1a774ae1f3"
}
"
help me

Post Reply