Insert data to bucket gives unauthorized with http POST


#1

Hello,

I’m having some issues adding some data to my bucket through Rest API. I always get an unauthorized response. I used it on the Sigfox backend but I got the same error when I try the API outside sigfox backend.

More details on my request :

URL
POST https://api.thinger.io/v1/users/myusername/buckets/mybucket/data

HEADER
I added the following headers :
Authorization : Bearer myToken
Content-type : application/json

BODY
{
“device” : “test”,
“temperature” : 20,
“humidity” :10
}

Thanks in advance


#2

can you please upload a picture of your configuration?


#3

Here is the token configuration on thinger.io

Do you need more information ?

I’ve followed this documentation : http://docs.thinger.io/sigfox/


#4

Yes, please, share the Sigfox config also!


#5

Here is the callback set on the sigfox backend.

Like I told you, I also just tried the API with http://hurl.it/ and I got the same error unauthorized.

Thanks @alvarolb


#6

Your content type is not application/json in this screenshot. Your username is not IotBirdFeeder but iotbirdfeeder. Take into account that the login is case sensitive :slight_smile:

Best.


#7

Thanks mate, turned out it was a case problem for the bucket name too.

My problem is solved.