Getting Wellness Data from your Apple Watch via Apple Shortcuts

I can’t get shortcuts to connect to the api. I can connect to the api with python using the same api_key in python and can update wellness fields or do whatever I want. “Get contents of” in Shortcuts keeps returning a 401 error. Did my best to catch any kind of spelling bug, but can’t see that. Driving me a little crazy.

I had to base64 encode the API_KEY to get this to work with shortcuts. The whole thing. Using this string “API_KEY:myapikey”.

I’ve set up a shortcut to upload a FIT file from the iOS share sheet; however, I’m getting 401 “Unauthorized” errors. I’m using the API_key:myapikey form suggested above. I’ve tried passing it as plain text and base64 encoding it, but neither works. Can anyone see what I’m doing wrong?

I got it to work! I had to add “basic ” before the base64-encoded authorization string.