API Key updated, now no longer working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

API Key updated, now no longer working

Post by GldRush98 »

So I inadvertently updated my API key on my profile and now API authorization is no longer working. I just get a "Your session has timed out" error. :o

It was used to auto log in to opscreen. It basically called a url of the format
opscreen.php?username=myuser&ticket=apikey
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: API Key updated, now no longer working

Post by jomann »

If you're running 5.3.0 then the API key is actually different then your backend ticket! Which means that you won't be able to use your API key to log in via the username/ticket variables like before. The ticket does still exist, it just isn't the same as your API key anymore :)

You can get the ticket by either looking in the DB, the rapid response URL, or checking the URLs in Admin > Manage Components > Backend API > select user you want ticket for.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: API Key updated, now no longer working

Post by GldRush98 »

Yes, that explains it! I should have left the URL alone and it wouldn't have broke :lol:
Running a psql query:

Code: Select all

nagiosxi=> select * from  xi_users where username='myusername';
Reveals the error of my ways. The ticket is now different from the api_key. I guess they used to be the same but are now different.

and
Admin > Manage Components > Backend API > select user you want ticket for.
Is useful :)

Thanks. I'll stop monkeying with things now :oops:
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: API Key updated, now no longer working

Post by jomann »

Awesome, so it's working now? Can we help you with anything else or is it okay to close this? :)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: API Key updated, now no longer working

Post by GldRush98 »

Oh yeah, working good. Close away. :)
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: API Key updated, now no longer working

Post by avandemore »

Great, if you have further problems please open a new thread.
Previous Nagios employee
Locked