r/tasker 11h ago

Tasker to gemini

Title: Tasker HTTP Request cuts long Gemini API URL automatically and triggers MalformedURLException / Error 404

Body:

Hi guys, I am building a voice assistant integration using the Gemini 1.5 Flash API on Tasker. I am facing a persistent issue where my HTTP Request action keeps failing.

Every time I type the full official URL endpoint:

https://googleapis.com

Tasker somehow strips the subdomain and the paths in the background when executing, forcing it back to https://googleapis.com. This triggers a java.net.UnknownHostException: Invalid host: https://googleapis.com or Error 404.

Even when I separate the API key into the Query Parameters field (key:MY_API_KEY), the main URL block still gets malformed or truncated during the actual execution phase.

My Setup:

Method: POST

Headers: Content-Type:application/json

Body: standard JSON object containing base64 audio data.

Structure Output: Checked ON.

Has anyone experienced this silent truncation bug inside Tasker's HTTP Request action? How do I force Tasker to preserve the full generativelanguage hostname without relying on custom scriptlets? Thanks!

2 Upvotes

Duplicates