TYK IInstallation API Test

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:18:30 +0000.
Sender:[email protected].
Date:Tuesday, 21 July 2015 19:55:33 UTC+1.

I’m looking at Tyk. I followed all the Installation directions, Tyk.conf updates and API updates under Download. I’m successfully running the gateway. I execute the ‘curl’ command and get the attached in the response (below) highlighted by not having credentials authenticated(?). The install said to set “use_Keyless” to True and blank out auth.

curl http://135.16.162.121:5000/quickstart/get
{
“args”: {},
“headers”: {
“Accept”: “/”,
“Accept-Encoding”: “gzip”,
“Connection”: “close”,
“Host”: “httpbin.org”,
“User-Agent”: “curl/7.35.0”,
“X-Request-Id”: “22fa662e-0146-4cce-809b-137923946891”
},
“origin”: “x.x.x.x, x.x.x.x”,
“url”: “http://httpbin.org/get
}

Access Denied
Access Denied (authentication_failed)

Your credentials could not be authenticated: "General authentication failure due to bad user ID or authentication token.". You will not be permitted access until your credentials can be verified.
This is typically caused by an incorrect username and/or password, but could also be caused by network problems.

root@vapikong:~/tyk/tyk.linux.amd64-1.7.1/apps# { > "args": {}, > "headers": { > "Accept": "*/*", > "Accept-Encoding": "gzip", > "Connection": "close", > "Host": "httpbin.org", > "User-Agent": "curl/7.35.0", > "X-Request-Id": "22fa662e-0146-4cce-809b-137923946891" > }, > "origin": "x.x.x.x, x.x.x.x", > "url": "http://httpbin.org/get" > } No command 'args:' found, did you mean: Command 'args' from package 'ucommon-utils' (universe) args:: command not found headers:: command not found Accept:: command not found Accept-Encoding:: command not found Connection:: command not found Host:: command not found User-Agent:: command not found X-Request-Id:: command not found },: command not found origin:: command not found url:: command not found

Thanks,
Confused…

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 21 July 2015 20:37:54 UTC+1.

Hi,

The curl command is just:

curl http://135.16.162.121:5000/quickstart/get

The JSON data that you are seeing in the command is the response from the server (if you pointed your API defintiion at httpbin.org), not the data to send (you would need to use the --data flag for that, which it look slike you tried to do in the second command).

However the command id execute the GET to Tyk, as whatever upstream API you have pointed Tyk at is returning an authentication error (that’s the HTML).

Tyk doesn’t return HTML errors, all errors you will get back from the Tyk system will be JSON :slight_smile:

Many thanks,
Martin