Development authorization
What's development authorization(Key)
Development authorization is the application key used in the online development, which is the service password identification. It's a security system to protect the user's service published in the cloud platform, which is composed with 24 random letters and numbers.
If you want to use the online services or API resource for Web development, please apply a Key in advance.
Apply for Key
Anyone can logs in SuperMap Online and apply for the development key.
Depending on the usage scenario, the key's application category can be: site access or service request.
Site access
Websites or Web Apps that allows you to make requests using the key, e.g. http://www.mywebsite.com.
This method is appropriate for production environment, you only need to determine the domain name, and there is no limit in subsequent changes and upgrades of server IP.
Access source IP
The server IP that allows using key to send requests, which is generally appropriate for development or testing environment. If the server IP changes, you need to amend the IP setting of the key, but the key string itself will not change.
If IP is 0.0.0.0, it means that there is no restrict for servers that make requests; any machine can use this key to make requests. Please use it warily, this is recommended for testing only.
How to use Key
If developers want to access the service, they can add the key request parameter to the service URL, like this:
http://www.supermapol.com/iserver/services/kx8modst/rest?key=VeXOcFHJrYLsMS3YyT9AR6zc
The part before '?' is the service URL, and the part (key=...) is the key request parameter. You can access the service by this URL.
You can request API through key.
Limitation of Key
Key can be used in two types of services:
-
Hosted Service API: Including Data Management API, Query and Mapping API, Data Processing API, Spatial Anaysis API. By using API, you can perform the next relevant action on the managed data of the published service.
-
Standard Service API: Including Online Symbol API, 2D Map API, Planning and Searching API, Data Processing API, By using API, you can request service provided by SuperMap Online, such as plotting symbols, 2D basemap, POI searching, geocoding, etc.
Only if you apply a key, you can use these GIS services. SuperMap Online provides a quota of free API every day, you can get it in Development Store.
Description of the request error code
The following messages are the returned information of the error request:
Request response:
{
"succeed":"false"
"error":
"errorMsg":"the request keys have been the maximum number"
"code":"400"
}
"code" is the error code, "errorMsg" is error details.
- 200:the server has performed the HTTP request of the client successfully.
- 400:request error. The request parameters of the client are not valid or there are not enough information, or other reason.
- 401: the resource operation is not finished because of security issue, maybe the key is wrong, or the service is wrong, or the request IP is not accepted.
- 404:The requested service is not available, that is, the URL is invalid.
- 406:The resource doesn't support the required format.
- 500:An exception occurs on the server side, so that the request is not finished.