Symptom
AutoNavi provides different types of API Keys for different business cases. The mashup "AutoNavi Maps" requires an API Key of the type Web(JS API). If the mashup is not working properly, it's recommended to first confirm whether a correct API Key is used.
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
*NOTE: All the locations mentioned in this KBA are not precise. They are only a rough geographical location.
Environment
SAP Cloud for Customer
Resolution
For the API Key applied for before Dec 2nd, 2021, please follow the steps below to verify if the API Key can be used for the mashup.
- Access the URL https://restapi.amap.com/v3/geocode/geo?key=XXXXXXXXXXXXX&s=rsv3&callback=jsonp_758225_&platform=JS&logversion=2.0&sdkversion=1.3&address=%E4%B8%AD%E5%9B%BD%E4%B8%8A%E6%B5%B7%2CCN%2C, where XXXXXXXXXXXXX represents the API Key.
- If the response payload contains status:0, it means that the API Key is incorrect. Please copy the error code and check the error description at Description of the error code.
- If the response payload contains status:1, it means that the API Key is correct and can be used in C4C.
For the API Key applied for after Dec 2nd, 2021, it must be used with a security key. Please follow the steps below to verify if the API Key and security key are correct.
- Access the URL https://restapi.amap.com/v3/geocode/geo?&s=rsv3&callback=jsonp_758225_&platform=JS&logversion=2.0&sdkversion=1.3&address=%E4%B8%AD%E5%9B%BD%E4%B8%8A%E6%B5%B7%2CCN%2C&key=XXXXXXXXXXXXXXX&jscode=YYYYYYYYYYYYYYYY, where XXXXXXXXXXXXXXX represents the API Key, YYYYYYYYYYYYYYYY represents the security code.
- If the response payload contains status:0, it means that the API Key and security key is incorrect. Please copy the error code and check the error description at Description of the error code.
- If the response payload contains status:1, it means that the API Key and the security key are correct and can be used in C4C.
*NOTE: All the locations mentioned in this KBA are not precise. They are only rough geographical locations.
See Also
- 3414767 - How to apply for an AutoNavi API Key?
- AutoNavi Help Doc: Description of the error code
- AutoNavi Help Doc: JS API security key usage
Keywords