User always denied API access


I have created a test user in graylog 3.1.2, given him the “Reader” role and an API key. However, when trying to search for some data I always get

“type”: “ApiError”,
“message”: “Not authorized”

I have tried giving all possible permissions to no avail. Only adding the user to the “Admin” group helps.

how did you searched with the user (exact call) does the user had access to any stream and was the search filtered on the stream he had access to or did you tried the “universal” search with the user that has reader roles only?


I enabled all the streams in the user’s settings while testing.

I was trying just with /universal/ . Now I added &streams:000000000000000000000001 but that didn’t help.

The request is now as follows:

curl -s -u foobarbaz:token -H ‘Accept: application/json’ -H ‘X-Requested-By: cli’ -X GET ‘

the universal/default stream is nothing a non admin user can use.

My syntax for stream filtering was wrong. It is not part of the “fields”, but of “filter”.

Therefore, to a search, one needs to append: “&filter=streams:000000000000000000000001” (or whichever stream they need)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.