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.
Locked
User avatar
DMAjic
 
Posts: 5
Joined: Sat Feb 18, 2017 12:20 pm

adafruit.io Error

Post by DMAjic »

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"
}
]
}

mfalkvidd
 
Posts: 6
Joined: Fri Jun 08, 2018 10:15 am

Re: adafruit.io Error

Post by mfalkvidd »

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

User avatar
abachman
 
Posts: 352
Joined: Mon Feb 01, 2010 12:48 pm

Re: adafruit.io Error

Post by abachman »

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.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”