Tyk dashboard - Advanced API Management: Authorization

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:10:45 +0000.
Sender:Miii Eeee.
Date:Monday, 27 April 2015 18:51:07 UTC+1.

Hi,

Could you please clarify what is the value that goes in the autorization header when creating a new user as specified in the link below?

https://tyk.io/advanced-api-v0-9/users/

Thanks,

M

Imported Google Group message.
Sender:Martin Buhr.
Date:Monday, 27 April 2015 19:03:57 UTC+1.

Hi,

If you have your dashboard set up, go to the users section and view your user, there will be an API key in the details view - use this key to access the advanced API, it allows you to do everything hat user is allowed to do in the dashboard.

Thanks,
Martin

Imported Google Group message.
Sender:Miii Eeee.
Date:Tuesday, 28 April 2015 09:59:52 UTC+1.

Hi,

I have tried that. In the dashboard I went to my user and copied the “Tyk Dashboard API Access Credentials”

And then tried the call:

curl -v -X GET -H ‘authorization: 38212641f42f4912411823a71e3daa09’ http://localhost:3000/api/users

and I am all the time getting

  • Hostname was NOT found in DNS cache
  • Trying 127.0.0.1…
  • Connected to localhost (127.0.0.1) port 3000 (#0)

GET /api/users HTTP/1.1
User-Agent: curl/7.35.0
Host: localhost:3000
Accept: /
authorization: 38212641f42f4912411823a71e3daa09

< HTTP/1.1 401 Unauthorized
< Content-Type: text/plain; charset=utf-8
< Date: Tue, 28 Apr 2015 08:53:38 GMT
< Content-Length: 56
<
{“Status”:“Error”,“Message”:“Not authorised”,“Meta”:“”}

In the tyk dashboard log I see the following

time=“2015-04-28T08:58:33Z” level=error msg=“Error trying to get value:”
time=“2015-04-28T08:58:33Z” level=error msg=“redigo: nil returned”
time=“2015-04-28T08:58:33Z” level=error msg=“Key not found”
[427 μs] 401 ‘/api/users’

Any ideas what I am doing wrong?

M

  • show quoted text -

Imported Google Group message.
Sender:Miii Eeee.
Date:Tuesday, 28 April 2015 10:11:52 UTC+1.

Hi,

I reset the key and it works fine. Do keys have an expiration date associated?

M

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 28 April 2015 10:14:43 UTC+1.

Hi Mii,

They shouldn’t - but the key may not have been created properly when the user was set up. It’s a bug, might be worth raising a ticket in our Github repo about it so we can track it for a future release :slight_smile:

Thanks,
Martin

  • show quoted text -