JSON Username, Password

GQuack

n3wb
Joined
Dec 25, 2016
Messages
19
Reaction score
2
Location
Hawaii
Ok, I'm ready to admit this has to be something right on the end of my nose that I'm not seeing. I'm working with JSON for the first time and have been reading posts and the help file, etc. on how to use. I want to do a simple thing which is to switch to profile 3. I've been able to get to the point where I can submit a JSON request but every time I get back the BI login page. If I follow through with the login, the command works fine but I am trying to pass the user name and password in the command to bypass the login. Here is the string I am using:

IP address:port/admin?profile=3&lock=2&user=username&pw=userpassword
where: Username is my admin rights username with associated username password

Where is my mistake please and thank you for your help.
 

GQuack

n3wb
Joined
Dec 25, 2016
Messages
19
Reaction score
2
Location
Hawaii
I'll keep going with my latest testing after continuing to read various posts and more help info.
Under Web Server, Advanced.. changed authentication to Non-Lan
Updated User Anonymous: to admin level
Tried again:
IP address:port/admin?profile=1&lock=2
Result: Heard what must be the "pop" sound
Get the message Authorization Required
Under Status: Connections..I see Anonymous User, last connected from my laptop
All that looks promising other than the Authorization Required message but....
No change of profile in Blue Iris
Close...
Any suggestions, anyone?
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,768
Reaction score
39,021
Location
Alabama
I'll keep going with my latest testing after continuing to read various posts and more help info.
Under Web Server, Advanced.. changed authentication to Non-Lan
.....Any suggestions, anyone?
Try un-checking "use secure session keys and login page" on that same Options/Web server/Advanced page.

If that fails, then perhaps under user "Anonymous", check "LAN only" if you intend to require only non-LAN to authenticate.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,676
Reaction score
14,024
Location
USA
You aren't using JSON. That is something different.

If you need those requests to work, then you need to do like TonyR said and disable secure login, or alternatively, if the requests will always come from the same IP address you can whitelist that by putting it in BI's blacklist IP list preceded by a ^ character. The ^ will make all requests from that address have admin permission automatically.

Code:
^192.168.0.101
 

GQuack

n3wb
Joined
Dec 25, 2016
Messages
19
Reaction score
2
Location
Hawaii
Thank you both for the replies. I did get this to work last night finally, tried every combo I could come up with. Very weird, was getting a successful login message on BI status, but Authorization Required and no change of profile on execution even with the admin box checked for user Anonymous and with "use secure session keys and login page" unchecked, regardless of the white listed IP address or not. I changed over to my regular username and password with which I normally use the system (admin rights), tried again, and it worked, yay! Moving forward....
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,768
Reaction score
39,021
Location
Alabama
FWIW, when working with various combos /variations of configs for usernames, rights, authentications, etc. for those users, I have noted that on more than one occasion I have had to completely close then re-open BI to allow for proper execution of those config changes, especially when accessing via UI3.
 
Top