From 86e0a81f88981e6181467a7aae1df22b96a17e97 Mon Sep 17 00:00:00 2001 From: rafal Date: Fri, 30 Jan 2026 10:39:07 +0000 Subject: [PATCH] Update README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index f0aace9..bdf4ceb 100644 --- a/README.md +++ b/README.md @@ -102,3 +102,36 @@ If exists: Checks if IP matches. If not, performs PUT (Update). If missing: Performs POST (Create). +### ERROR +This error (400 Invalid API key format) means that the IONOS server rejected the key because its structure is incorrect. +The most common causes are: +Extra spaces (accidentally copied when pasting). +Manually adding a dot in the config file (the script adds the dot automatically). +Using the wrong type of key (Cloud API key instead of Hosting/DNS API key). +Here is how to fix it step by step. +``` +sudo nano /opt/ionos-ddns/config.json +``` +Make sure the quotation marks are placed directly against the characters, with no spaces. +WRONG (note the spaces): +``` +"api_prefix": " 23498723498 ", +"api_secret": " a1b2c3d4 " +``` +CORRECT: +``` +"api_prefix": "23498723498", +"api_secret": "a1b2c3d4" +``` +STEP 2: Do not add a dot in config.json +The Python script contains this line: +``` +"X-API-Key": f"{prefix}.{secret}" +``` +It automatically joins these two values with a dot. +If you entered in config.json something like: +prefix: "myPrefix." +then the script sends: +"myPrefix..secret" (two dots), which causes the error. +api_prefix: Only the first part of the key. +api_secret: Only the second, long part of the key. \ No newline at end of file