question

newuser-4f467f4b-dc7a-4c4e-aaae-7e43abe2898d avatar image

Error: Received status 4xx "Bad request" while attempting to retrieve feed?

What does this error mean?

Error: Received status 4xx "Bad request" while attempting to retrieve feed.


alexa skills kitskillhelpflash briefing
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pete S avatar image
Pete S answered

Where are you hosting your feed? Does it work if you try and access it via a browser?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-4f467f4b-dc7a-4c4e-aaae-7e43abe2898d avatar image
newuser-4f467f4b-dc7a-4c4e-aaae-7e43abe2898d answered

I have it on the s3 in the buckets. This is the link that I am trying to upload "https://s3.amazonaws.com/2bb/Bryan+Fabric.mp3" which, your right doesn't have a browser associated with it. So instead I clicked Open on the S3 bucket and used the https url which then gives me the error: "Feed content is too large. However, the feed is only 1.8 MB

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pete S avatar image
Pete S answered

The Flash Briefing is expecting an XML or JSON file which contains details of your MP3 file, it sounds like you're trying to add the MP3 directly which won't work.

Take a look at the feed reference in the documentation, it'll show you what informaton you need to provide and in what format: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/flash-briefing-skill-api-feed-reference

3 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

So do I need to make a JSON through lambda AWS or is there an easier way to create a XML/JSON file to upload?

0 Likes 0 ·
Pete S avatar image Pete S newuser-4f467f4b-dc7a-4c4e-aaae-7e43abe2898d commented ·

You need to make an XML file or a JSON file with the relevant details in it. You'll also need this to be updated whenever the content of your MP3 changes.

Personally I use S3 to host the feed file with a Lambda script generating the content. There are other ways to achieve this though such as using Lambda with Amazon API Gateway

1 Like 1 ·

Being new to coding, is there a coding website/examples that you would suggest me to learn from to figure out how to create a Lambda script to retrieve my s3 files?

0 Likes 0 ·
newuser-4f467f4b-dc7a-4c4e-aaae-7e43abe2898d avatar image
newuser-4f467f4b-dc7a-4c4e-aaae-7e43abe2898d answered

So do I need to make a JSON through lambda AWS or is there an easier way to create a XML/JSON file to upload?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-4f467f4b-dc7a-4c4e-aaae-7e43abe2898d avatar image
newuser-4f467f4b-dc7a-4c4e-aaae-7e43abe2898d answered

Being new to coding, is there a coding website/examples that you would suggest me to learn from to figure out how to create a Lambda script to retrieve my s3 files?

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pete S avatar image Pete S commented ·

Pick a language, Python or Javascript would be ideal, and find a few tutorials you feel comfortable following. I've not used any myself so unfortuantly I cannot recommed any.

If you use Python you can use boto3 to send the file to S3 on a regular basis.

1 Like 1 ·
newuser-0b4373f5-db28-4e95-b982-3a0afd8fa632 avatar image
newuser-0b4373f5-db28-4e95-b982-3a0afd8fa632 answered

Dear friends, I always have received the follow error instruction;

"

Error: Received status 4xx "Bad request" while attempting to retrieve feed."

I´ve created a json file in atom software and save it .json extention file , please could you help me ?

Thank so munch your help !!

[
  {

// this uid is from alexa skill id ? like  amzn1.ask.skill.7263ecc6-64fa-4d52-b710-1a5c787e5acc ??//


    "uid": "urn:uuid:7263ecc6-64fa-4d52-b710-1a5c787e5acc",   

//how do I write code to show correct time ?

     "updateDate": "2018-01-31T15:08:51.0Z",

    "titleText": "Porto de Santos",
    "mainText": "",

//I´ve created a mp3 file in aws polly, named flash-briefing-1.mp3, and put it in s3 bucket


    "streamUrl": "https://s3-eu-west-1.amazonaws.com/flash-briefing-exemple/flash-briefing-1.mp3",

//I need create a blog, or introducing this url, is correct ?


    "redirectionUrl": "https://developer.amazon.com/public/community/blog"
  }
] 
2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Darin Pope avatar image Darin Pope commented ·

what is the URL of your feed?

0 Likes 0 ·
Anand@Amazon avatar image Anand@Amazon ♦ commented ·

Please provide public access to your mp3 s3 bucket.

0 Likes 0 ·
Hans avatar image
Hans answered

Can someone help me figure out why my JSON is unable to be parsed?

[ { "uid": "urn:uuid:1335c695-cfb8-4ebb-abbd-80da344efa6c", "updateDate": "2018-12-12T02:34:51.0Z", "titleText": "Bedrock Health and Fitness Flash Briefing", "mainText": "", "streamUrl": "https://s3.us-east-2.amazonaws.com/bedrock-flash-briefing/Bedrock-2018-12-12.mp3", "redirectionUrl": "https://hansschiefelbein.com" }, { "uid": "urn:uuid:1335c695-cfb8-4ebb-abbd-80da344efa6d", "updateDate": "2018-12-11T02:34:51.0Z", "titleText": "Bedrock Health and Fitness Flash Briefing", "mainText": "", "streamUrl": "https://s3.us-east-2.amazonaws.com/bedrock-flash-briefing/Bedrock-2018-12-11.mp3", "redirectionUrl": "https://hansschiefelbein.com" }, { "uid": "urn:uuid:1335c695-cfb8-4ebb-abbd-80da344efa6e", "updateDate": "2018-12-10T02:34:51.0Z", "titleText": "Bedrock Health and Fitness Flash Briefing", "mainText": "", "streamUrl": "https://s3.us-east-2.amazonaws.com/bedrock-flash-briefing/Bedrock-2018-12-10.mp3", "redirectionUrl": "https://hansschiefelbein.com" }, ]

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Darin Pope avatar image Darin Pope commented ·

The very last comma right before the closing right bracket causes the JSON to be invalid:

"redirectionUrl": "https://hansschiefelbein.com" }, ]
0 Likes 0 ·
XutenHome avatar image
XutenHome answered
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.