While creating a token i did not refer to a policy. In my policy directory i have one default policy loaded:
{
"default": {
"rate": 1000,
"per": 1,
"quota_max": 100,
"quota_renewal_rate": 60,
"access_rights": {
"41433797848f41a558c1573d3e55a410": {
"api_name": "My API",
"api_id": "41433797848f41a558c1573d3e55a410",
"versions": [
"Default"
]
}
},
"org_id": "54de205930c55e15bd000001",
"hmac_enabled": false
}
}
In order to create a first token i used this exact example:
curl -H "x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7"\
-s\
-H "Content-Type: application/json"\
-X POST\
-d '{
"name": "Test API",
"slug": "test-api",
"api_id": "1",
"org_id": "53ac07777cbb8c2d53000002",
"auth": {
"auth_header_name": "Authorization"
},
"definition": {
"location": "header",
"key": "x-api-version"
},
"version_data": {
"not_versioned": true,
"versions": {
"Default": {
"name": "Default",
"use_extended_paths": true
}
}
},
"proxy": {
"listen_path": "/my-api/",
"target_url": "http://httpbin.org/",
"strip_listen_path": true
},
"active": true,
"domain": ""
}'\
http://{my_server}:8080/tyk/apis/ | python -mjson.tool