Rest API can't work, the http response "Not authorized"

Livia Yu
Added 3 months ago

Dear sir,

we need enable rest API to do something.
but the Http StatusCode always 401 that means we need to login it.

Should I log in before using the API?
how can i get the authorized to use the rest API?


xxx.bmp (827 KB) xxx.bmp

Replies (2)


Added by Livia Yu 3 months ago

our tigase sever is 7.1.4.

when I run command curl "" at liunx.
it will show "Not authorized".

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 3 months ago

Please check the configuration of the security settings for the HTTP component and REST API. Most likely you do not have API key configured and you are not sending one as a part of the requests which results with 401 error code.

Alternatively, you will need to configure API key as open_access. By default, all access to the REST API requires providing a proper API key.