Hello to each other, I'm new here and wanted to test how it works with the transfer of data. To do this, I registered with ThingSpeak. I entered the API code in a Python script (see screenshot). Unfortunately, I always get the message: Response 400. When I enter the web address directly in the browser, I get a "0" back. I can't see an error entering the API key. Can you help me? I use a Raspberry 4B with the PIR sensor HC-SR501. The program will later run on a Raspberry Zero. Have a nice weekend everyone. Response 400, test how it works with the transfer One thing to check is to be sure you are using the channel API key and not your user API key. Also you can check the format of the API call in your browser window. See the API keys tab of your channel view for the suggested format. Danke für die schnelle Antwort. Ich habe einfach nochmal einen neuen API Schlüssel erzeugt und diesen per Drag and Trop eingegeben. Danach hat es funktioniert. Grüße aus Ulm/ Baden-Württemberg I'd also recommend removing the extra spaces in your 'requests.get' statement. Specifically, the spaces in this snippet 'api_key = SOMETHING & field1 = SOMEVALUE' should be replaced with 'api_key=SOMETHING&field1=SOMEVALUE'. The spaces get encoded as %20 (ascii character for spaces) and could be the reason you're seeing the 400 response. raspberry pir hc-sr501 python