Project

General

Profile

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

Livia Yu
Added 18 days 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?

Thanks

xxx.bmp (827 KB) xxx.bmp

Replies (2)

(2)

Added by Livia Yu 18 days ago

our tigase sever is 7.1.4.

when I run command curl "http://10.206.25.28:8088/rest/stats/" at liunx.
it will show "Not authorized".

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 18 days 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.

    (1-2/2)