Hello
I have Authen::Token installed on test server and it is working. Now i am trying to put in on production, i can see that module is loaded, also token is generated.
I am sending request from the same script as to dev server. The issue is that I am getting {“message”:“Unauthorized”}
Token in send in head like : curl -H ‘Authorization: token 1-14-12312321321321321’ 'http://prod.com/REST/2.0/queues/all
What could be a reason, in logs I do not see anything.
thank you.
miha
Are you using the production token and not the dev token?
Each server will have its own tokens - you can’t just use the token from the dev server on the production one.
Assuming you have generated a fresh token, the other thing to check if you’re using Apache as the web server is that you allow RT access to the Authorization header by making sure that you have this line in your web server config:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Hello
yes, this is sure
I am using different token ![:slight_smile: :slight_smile:](https://forum.bestpractical.com/images/emoji/twitter/slight_smile.png?v=12)
Another thing what bothers me: curl -u username:password ‘http://production/rt/REST/2.0/queues/all’
Also this does not work in production with production credentials ![:slight_smile: :slight_smile:](https://forum.bestpractical.com/images/emoji/twitter/slight_smile.png?v=12)
@GreenJimII SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
if this is not set correctly also with “curl -u” will not work? This was added to httpd.conf, it should be somewhere else?
tnx!
In our case its in our ssl.conf file as our RT is using SSLed connections.
Don’t forget that you have reload your web server to make a changed configuration work.