Right off the bat, I would recommend adding a delay between getting the URL and actually doing the GET on that link. It takes some time for that link to get fully ready.
I'll share what I have so far. This is by no means a finished shortcut. Right now it's being held together with duct tape and chewing gum. But hopefully, it gets you closer to what you're trying to do. You'll need to change some things around as I call a dictionary that references my API key.
I tried to get the custom timestamp working but I never could get it. Let me know if you come up with one that's more efficient.
https://www.icloud.com/shortcuts/9b94825d64304ae783e61e02c11f9685