Cannot Connect To Portal

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:13:00 +0000.
Sender:John Williams.
Date:Friday, 15 May 2015 08:14:18 UTC+1.

“error”: “Authorization field missing”

That is the error I get when trying to connect to the portal

I have tried using

but get the same error.

Tyk is running on 8080.

I have also tried setting up nginx to serve via a subdomain but there is no luck.

I set up using the quick start guide and installed from docker.

not sure what else to try. Really great app but I cannot seem to get this last step to work.

any ideas?

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 15 May 2015 08:35:39 UTC+1.


Do you have the dashboard running? Tyk consists of three components:
Tyk - this is the raw gateway component, it is headless, the messages youa re seeing are from this component
Tyk Dashboard - This is both the analytics dashboard AND the portal, it runs on port 300 and is a separate file, you can download the tarball from the github releases page
Tyk Host Manager - This manages nginx configurations for you.
If you want to get the portal running, you will need have the dashboard and the host manager set up. Quickest way to get started is to use our docker quickstart guide…

(p.s. you’ll also need a trailing slash at the end of /portal)


  • show quoted text -

Imported Google Group message.
Sender:John Williams.
Date:Friday, 15 May 2015 08:58:44 UTC+1.

Hi Martin;

Thanks so much for the quick response.

These are the instructions I used to install:

I ran:

$ ./
To install the application. That went smoothly.

i can access the dash board on port 3000 with no problems via

I set up the portal by clicking “Settings” and doing the other functions too.

I then tried to access the portal but it gave the the “Authorisation Token Required”

If I run:

$ curl http://testorg.tyk.docker:8888/portal/

The response is the portal page HTML so I am fairly certain it is installed and running.

If I try and access to he portal through a browser, that is when it gives me the:

error: Authorzation required.

It seems as though the browser is routing though the api page not the portal testorg.tyk.docker test-api.testorg.tyk.docker

It looks like every is routing through the second entry.

Many thanks for your time. I am a noob so sorry if I have made a really obvious error!



  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 15 May 2015 09:04:03 UTC+1.


How odd :-/

This is a silly thing to check, but you do need to make sure that you are adding that trailing slash:


If curl is picking it up, then yoru config is all set up and working, maybe try an incognito browser window?


  • show quoted text -

Imported Google Group message.
Sender:John Williams.
Date:Friday, 15 May 2015 09:12:47 UTC+1.


This gives the authorisation error

this gives a 404 not found.

The tyk.conf file says tyk is listening on 8080

It is all very weird. Not sure what is going on.

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 15 May 2015 09:25:44 UTC+1.

Hi Eigo,

The tyk.conf file only control the gateway, not the portal. it looks like you are trying to access things via IP addresses, the portal requires a domain, which is why we make you set up the hosts file.

If you click this link: http://testorg.tyk.docker:8888/portal/ what hapens?

Just to clarify, there are three containers:
tyk_gateway (this is listening on 8080, but you need to access it with the docker container IP, this ONLY handles API’s, it has nothing to do with the portal, this is the core proxy
tyk_nginx (this is listening on 8888 and is the main way into the system), this is the host maanger, it handles routing, it will translate requests such as to somethig the gateway can use, i.e. http://upstream_tyk_gatway_host:8080/api-id/resource, api-id’s are massive UUIDs so it’s unlikely you would want to use them, but you can for testing, see the tvagrant quickstart for an example
tyk_dashboard (this is the dashboard and listens on 3000), this also hosts the portal, the portal is _actually _ on http://tyk_dashboard_ip:3000/org-id/portal/ - here the org-id is another long UUID which you probably don’t wantt o expose, the host maanger templates out the url rewrites for you under the hood so you never need to deal with this.
For the portal, you have to go through the domains you’ve set up in your hosts file, since you are using the quickstart, so not an IP address but http://testorg.tyk.docker:8888/portal/, since the host manager is telling nginx to explicitly listen for that domain and redirects to the appropriate oints in the Tyk stack.

It’s a little complex, but that’s because the components can be deployed in so many different ways and aren’t dependent on one another, you can add the ones you need depending on your setup, the quickstart just bundles them in a very specific way to make it all work out of the box.


  • show quoted text -
1 Like

Imported Google Group message.
Sender:John Williams.
Date:Friday, 15 May 2015 09:41:19 UTC+1.


Roger that! I think I understand. I have installed on a remote EC2 instance which is why I cannot access:


If I understand correctly I need to configure a working domain (add to etc/hosts?) that points to the tyk stack and then let tyk handle everything from there?

Is that what I would need to do to get this running?

Do I need to install NGINX or would i configure ty_nginx.

Everything seems to be fine it is just the authorisation error that I am worried about. In the dashboard all requests for portal are coming from a Key (00000000000) and they are all failing. it seems like there may be an additional step I forgot to do.

Sorry for the bother. Really keen to get this up and running. It is exactly what we were looking for.



  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 15 May 2015 10:11:43 UTC+1.

Hi Eigo,

The quickstart really isn’t appropriate for an EC2 instance deployment, it configures things quite specifically for a local set up (hence the host file changes).

I would suggest you get docker installed on your local machine (if you are running OSX then get yourself Kitematic - just make sure you modify your hosts file appropriately)

To get set up on an EC2 instance you will need ot set up a domain, ideally a wildcard for subdomains and point it at your ec2 instance, you’d then need to change the templates in the tyk_nginx docker to use your new domain, and then it might work. I’d strongly suggest getting things up and running locally so you can get familiar with the system and how it’s structured before attempting a deployment.

The authorisation error is absolutely nothing to worry about because that is the tyk gateway responding to what it thinks is an upstream API request and is blocking it, because your routing is misconfigured it is:

  1. Sending requests to the gateway
  2. The gatewway can;t identify the API ID it is meant to route to and so errors
  3. It reports an empty key because the whole request is invalid

This is untested, and a longhot, but you could try this:

Get a domain and assign the wildcard subdomain to point at your ec2 instance.

In th, modify this line:

echo “Setting up NginX and Host Manager”
docker run -d --name tyk_nginx -p 8888:80 --link tyk_gateway:tyk_gateway --link tyk_dashboard:tyk_dashboard --link tyk_mongo:tyk_mongo --link tyk_redis:tyk_redis -e DOMAINALIAS=tyk.docker tykio/tyk-host-manager


(You could also just kill the tyk_nginx container (docker stop tyk_nginx && docker rm tyk_nginx) and run the above command manually, what it will do is set the environment variable DOMAINALIAS to the doain of your EC2 instance, when the host manager container starts up, it fixes the nginx templates to use your new domain name.


  • show quoted text -

Imported Google Group message.
Sender:John Williams.
Date:Friday, 15 May 2015 10:23:11 UTC+1.

Yo Rock! Will follow this lead and make it work!

Thanks and if I can help with documentation etc. Let me know. You are perhaps the first person to ever get back to me with such detailed and friendly and helpful advice and I want to try and say thanks in a meaning full way.



  • show quoted text -

Imported Google Group message.
Sender:John Williams.
Date:Sunday, 17 May 2015 03:27:14 UTC+1.

Managed to get this working.

I had to uninstall the QuickStart stuff and start from a blank server again.


phalcon (optional I am using this framework)

There was a problem with the routing. There was an error generated that the organisation id could not be found so I created a new user and organisation. I copied the organisation id into the config file and hard coded this:

Portal redirect by OrgID

location /portal/ {

    rewrite /portal/(.*) /***YOUR_OWN_ORGID*****/portal/$1 break;

This got everything up and running well.

Still unable to create keys from the portal but for now I have everything that I need to be able to test fully.

I picked up some errors in the code that was posted to the TYK website. Missing quotes, etc that may cause others trouble.

Let me know if you would like me to post these somewhere for you.

Really happy with this. Good job guy!


  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 19 May 2015 15:55:15 UTC+1.

Hi Eigo,

Great to hear you got things working :smiley:

If you send me (my direct email will be copiesd in this message) the errors you found in the guide we’ll make sure to fix them.


  • show quoted text -

Today I tried to set the portal through “Your Developer Portal” → “Set your portal domain” option through the Tyk Dashboard.

I used the same domain I gave for the Tyk dashboard to be the portal domain ( and, and a different domain afterwards. Both ( and failed with the below error, when I click the “Open your portal option”.

“Not Found”

Do I still need to configure nginx, Tyk Host Manager, etc?
From Tyk Host Manager is deprecated.

I do not have them configured. I just have Tyk-dashboard and Tyk-gateway configured. I also have TIB. But I do not think it is related to this error in anyway.

  1. You can’t use the same domain for either (see the other thread)
  2. You will need to include the port in your portal domain name

So for your dash, move it to a different host, put it on port 80 and then you won’t need to specify a port for the domain name

I set my dashboard to run on All is going well.

Now back to setting up the developer portal as above. This time, I did not use the same domain as you explained in this and the other (Panic Crash on Ubuntu X86 - #6 by Martin) thread.

I used the below as the new domain.

Please note that 8080 is configured as the portal port, as following the default configuration elaborated in the documentation.

Now, the dashboard throws the below error message, when I click “Set”.
“There was a problem updating your CNAME, please contact support”

tail -f /var/log/tyk-dashboard.stderr indicates the below.
time=“Jul 7 12:42:54” level=error msg=“INvalid domain supplied, not saving:

My tyk_analytics.conf is as below.

"host_config": {
    "enable_host_names": true,
    "disable_org_slug_prefix": true,
    "hostname": "",
    "override_hostname": "localhost",
    "portal_domains": {},
    "portal_root_path": "/portal",
    "generate_secure_paths": false
"http_server_options": {
    "use_ssl": false,
    "certificates": [
            "domain_name": "",
            "cert_file": "",
            "key_file": ""
    "min_version": 0

So it is not the same issue reported in Setting up developer portals - #4 by Martin

What could have gone wrong? Pls note, I am running Tyk on Centos 7.

The validator for domain names is crazy strict in the UI, so it fails the domain you are trying to use, try with something more standard and it will work.

The portal will be running on the same port as the dashboard, so not sure what you are talking about port 8080, that’s for the gateway.

1 Like

oh, yes. Thanks for catching that. Yes, it was which I messed up in copy-pasting.

Now coming back, I did not realize that was not a standard domain. You suggest dropping the ‘-’, and try a domain such as

That seems a bit weird in the validation. But I will give a try this morning and get back to you. :slight_smile:

@Martin I tried with which I think is a standard domain. It is still failing with the same error:

ERROR INvalid domain supplied, not saving:

Any hint on what is going on?

Thank you.

I would suggest using the Dashboard Organisations REST API to set the CNAME property of your org. The drop-down option only really likes very standard domains, no port number.

I am not exactly sure how to use Dashboard Organisations REST API to set the CNAME property of the organization. Is there a documentation or tutorial that I missed?

Thank you.

This post a little old, just adding my findings here about the “set your domain portal”

Updating the cname through the dashboard admin API works in both cases above.