I am trying to get geographic location in an Alexa skill. I have enabled location services in the Alexa console and I have authorized the skill to send geographic location.
The message I receive is the following:
{
"context": {
"Extensions": {
"available": {}
},
"System": {
"application": {
"applicationId": "..."
},
"device": {
"supportedInterfaces": {},
"deviceId": "..."
},
"apiEndpoint": "https://api.eu.amazonalexa.com",
"user": {
"userId": "...",
"permissions": {
"scopes": {
"alexa::devices:all:geolocation:read": {
"status": "GRANTED"
}
},
"consentToken": "..."
}
},
"apiAccessToken": "...",
"unit": {
"unitId": "..."
}
}
},
"version": "1.0",
"session": {
"application": {
"applicationId": "..."
},
"user": {
"userId": "...",
"permissions": {
"scopes": {
"alexa::devices:all:geolocation:read": {
"status": "GRANTED"
}
},
"consentToken": "..."
}
},
"new": true,
"sessionId": "..."
},
"request": {
"requestId": "...",
"locale": "it-IT",
"intent": {
"name": "MyIntent",
"confirmationStatus": "NONE"
},
"type": "IntentRequest",
"timestamp": "2021-01-28T07:39:53Z"
}
}
As you may see, the geographic location is GRANTED but the Geolocation field described here is completely missing.
You're correct on geolocation not being available for most Echo devices. Stationary devices only provide the registered address, not geographic coordinates.
You can, however use a "geocoding" service to convert most addresses to coordinates. For example Google Maps has a geocoding API.