Hi

What I did wrong?

I create a token, and if I try to use the token to get an url under /api/system 
, I get Unauthorized back.

Thanks,

Norbert


curl -u USER:PASS -H 'Accept: application/json' -X GET 
'http://IP:9000/api/users/USER/tokens?pretty=true'
{
  "tokens" : [ {
    "name" : "NAME",
    "token" : "TOKENID",
    "last_access" : "1970-01-01T00:00:00.000Z"
  } ]
}

curl http://IP:9000/api/system -u TOKENID:token -i
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm="Graylog Server"
X-Graylog-Node-ID: XX
X-Runtime-Microseconds: 490
Date: Mon, 09 Jan 2017 10:58:23 GMT
Content-Length: 0


curl http://IP:9000/api/system -u USER:PASS -i
HTTP/1.1 200 OK
X-Graylog-Node-ID: XX
X-Runtime-Microseconds: 244491
Content-Type: application/json
Date: Mon, 09 Jan 2017 10:58:40 GMT
Content-Length: 402


-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/cffa4170-fe2f-4db9-804e-90bd419f840a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to