Ubidots Community

403 Authentication error connecting electron to ubidots

Hi. I am trying to send data via webhook from a particle electron to ubidots. I have read through almost similar issues and did what they suggested, i.e. specified the Token not API, provided the username and password credentials, check the Token is active (it is), check the URL in postman. All these still give the same issue and am out of options. Could the problem be am using “industrial” in the URL instead of “things”? What does it mean?

POST /api/v1.6/devices/DEVICE_ID_IN_PARTICLE?Content-Type=application%2Fjson&X-Auth-Token=TOKEN_IN_UBIDOTS HTTP/1.1
User-Agent: ParticleBot/1.1 (https://docs.particle.io/webhooks)
host: industrial.api.ubidots.com
authorization: Basic dGhvbWhhcnZleTpEYXRhRGlnaXRhbDE2
content-length: 32
Connection: keep-alive

Greetings @musoke, a 403 means that your token is not valid or you are using a wrong endpoint to send data to.

If you are using an educational account, you have to set as endpoint things.ubidots.com, if not, the endpoint should be industrial.api.ubidots.com

All the best

Thank you @jotathebest. the problem I had was that I had typed “X-Auth-Token” as the header name instead of “token”. Quite embarassing that this kept me up for hours.