Are there any clues in this message as to the problem that generates the 405 error? I've typed and retyped several times but cannot find the problem.
[ERROR] - Base station 3DFD - 2 seconds
405 - Not Allowed - #1
POST https://io.adafruit.com/DMAjic/dashboar ... mperatures HTTP/1.0
content-length : 307
accept-encoding : gzip,deflate
accept-language : fr
host : io.adafruit.com
user-agent : SIGFOX
accept-charset : UTF-8;q=0.9,*;q=0.7
x-aio-key : 45b633d708b049e5a83ea6bbb0b2e656
content-type : application/x-www-form-urlencoded
{
"feeds":
[
{
"key":"tempDn",
"value":"69"
},
{
"key":"tempUp",
"value":"{ customData#tempUp}"
},
{
"key":"voltage",
"value":"602"
}
]
}
adafruit.io Error
Moderators: adafruit_support_bill, adafruit
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
-
- Posts: 6
- Joined: Fri Jun 08, 2018 10:15 am
Re: adafruit.io Error
My guess is that Sigfox doesn't like getting JSON data when the content-type is set to application/x-www-form-urlencoded
Either encode the data as www-form-urlencoded or set content-type to application/json
Either encode the data as www-form-urlencoded or set content-type to application/json
- abachman
- Posts: 352
- Joined: Mon Feb 01, 2010 12:48 pm
Re: adafruit.io Error
Hi DMAjic,
mfalkvidd is right, the Adafruit IO service is complaining (i.e., returning an HTTP 405 error code) because you're sending JSON encoded data (content-type: application/json), but telling the server it's form encoded (application/x-www-form-urlencoded).
We're already pretty liberal with what kind of data formats we'll accept, but if the request claims one, but sends another, you're going to have a bad time :(
Also, I recommend regenerating your Adafruit IO key now that it's public knowledge. That key should be kept private, since it allows read/write access to all your stored data.
- Adam B.
mfalkvidd is right, the Adafruit IO service is complaining (i.e., returning an HTTP 405 error code) because you're sending JSON encoded data (content-type: application/json), but telling the server it's form encoded (application/x-www-form-urlencoded).
We're already pretty liberal with what kind of data formats we'll accept, but if the request claims one, but sends another, you're going to have a bad time :(
Also, I recommend regenerating your Adafruit IO key now that it's public knowledge. That key should be kept private, since it allows read/write access to all your stored data.
- Adam B.
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.