This article is a mirror article of machine translation, please click here to jump to the original article.

View: 385471|Reply: 121

[Source] The SDK of the SMS service reports an exception: SDK.InvalidRegionId : Can not find endpoint to access.

  [Copy link]
Posted on 6/25/2017 8:47:16 PM | | |
Because, I am making the .NET version of the SDK, and the official does not provide the .NET version of the SDK, so I can only write the SDK myself

Then, write one side of the SDK modeled after the Java version, and finally run it, and find that the error is as follows:

SDK. InvalidRegionId : Can not find endpoint to access.
The current Java version certainly doesn't get an error!!!

Alibaba Cloud's official explanation is as follows:

Open API error InvalidRegionId: Can not find endpoint to access

If you call the Message Queue Open API API and get the error InvalidRegionId : Can not find endpoint to access, check whether the regionId used in the code is correct.

Note that there are two places in the code where regionId is involved.

The first place:

IClientProfile profile = DefaultProfile.getProfile(regionId, accessKey, secretKey);

The regionId here has nothing to do with the regional information of the public network/Beijing/Hangzhou to which MQ Topic belongs, it only refers to the region where the API gateway is located, and the currently supported values are cn-beijing, cn-hangzhou, cn-qingdao, cn-shenzhen, and the default is cn-hangzhou.

Second place:

request.setOnsRegionId("regionid");

The regionid here is the regional information of the public network/Beijing/Hangzhou to which MQ Topic belongs. To obtain the regionid of each region, you can call the OnsRegionList method to obtain it.


In fact, the solution is very simple, and the solution is as follows:

Tourists, if you want to see the hidden content of this post, pleaseReply






Previous:HTML5 determines whether it is in full screen
Next:webapi ModelState.IsValid model validation
Posted on 9/21/2017 6:37:20 PM |
php sdk passing by
The code is about the same
In the afternoon, the machine sent a yes, it was online, no, the machine tried again... It's ridiculous
Can not find endpoint to access
Posted on 11/14/2017 5:27:46 PM |
xuexi                     
Posted on 11/27/2017 10:28:32 AM |
I added those lines of code, but it didn't work....   The development environment is normal, and this error is reported when it is placed on Linux
Posted on 7/3/2017 6:46:32 PM |
I also have this problem...
Posted on 7/10/2017 3:54:19 PM |
Also encountered the same problem
Posted on 8/3/2017 10:51:40 AM |
Also encountered the same problem
Posted on 8/4/2017 10:07:36 AM |
Reply just to see the solution
Posted on 8/6/2017 5:01:08 PM |
111111111111
Posted on 8/14/2017 7:33:24 PM |
Same issue
Posted on 8/16/2017 5:23:47 PM |
I'm here to see a solution :)
Posted on 8/17/2017 8:34:06 PM |
I also met
Posted on 8/31/2017 2:56:20 PM |
I also want to know
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com