Отвечать объект не работает, что здесь не так?

Я настроил приложение php, которое прослушивает запрос alexa и генерирует ответ. Портал тестирования на самом деле не дает много отзывов, просто он не работает.

Что амазонка отправляет.

{
"session": {
"sessionId": "SessionId.here",
"application": {
"applicationId": "amzn1.ask.skill.here"},
"attributes": {},
"user": {
"userId": "amzn1.ask.account.here"},
"new": true
},
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId.here",
"locale": "en-US",
"timestamp": "2017-02-22T21:33:26Z",
"intent": {
"name": "PlayTheStream",
"slots": {}
}
},
"version": "1.0"}

Мой ответ таков.

{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "PlainText",
"text": "Now streaming this stream"},
"card": {
"type": "Simple",
"title": "Play Audio",
"content": "Playing the requested stream."},
"directives": {
"type": "AudioPlayer.Play",
"playBehavior": "ENQUEUE",
"audioItem": {
"stream": {
"token": "this-is-the-audio-token",
"url": "http://functionalstream.com/playlist.m3u",
"offsetInMilliseconds": 0
}
}
}
},
"shouldEndSession": true
}

Заголовки ответа

cache-control →no-cache, private
content-type →application/json
date →Wed, 22 Feb 2017 21:33:10 GMT
server →nginx/1.11.2
status →200
x-content-type-options →nosniff
x-frame-options →SAMEORIGIN
x-xss-protection →1; mode=block

1

Решение

Возвращаемый поток должен быть целью https с соответствующим сертификатом. У вас есть http назначение.

0

Другие решения

Других решений пока нет …