problem password protected feed json link

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
erik
Newbie
Posts: 1
Joined: Sun Sep 24, 2017 9:17 pm

problem password protected feed json link

Post by erik » Sun Sep 24, 2017 9:26 pm

Hi i have problems with this JSON stocklist request

https://erik%40augustin.it:[email protected] ... ettpricing

testing
with chrome no problem link returns json data
with edge a popup shows up for login & password

with mjt taskmanager latets version:
Let>HTTP_SSL=1
You may also need to set the TLS version:
//set TLS to use 1.2
Let>TLS_VER=12
HTTPRequest>https://erik%40augustin.it:[email protected] ... ng,,,,JSON
MessageModal>JSON

i get messagemodal: You must enter a valid login ID and password to access this resource

Whats wrong?

Thanks
Erik

User avatar
Marcus Tettmar
Site Admin
Posts: 7265
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: problem password protected feed json link

Post by Marcus Tettmar » Wed Sep 27, 2017 1:06 pm

The issue is that the username should have the @ character in it (and not already encoded). So you need variables:

Code: Select all

Let>HTTP_SSL=1
Let>TLS_VER=12
Let>[email protected]
Let>password=*****
HTTPRequest>https://username:[email protected]/webservice/?reseller_nettpricing,,GET,,JSON
MessageModal>JSON
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Djek
Pro Scripter
Posts: 136
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Re: problem password protected feed json link

Post by Djek » Thu Sep 28, 2017 7:44 am

in this case you for best result you should put %% around the variables

so
HTTPRequest>https://username:[email protected] ... webservice

becomes
HTTPRequest>https://%username%:%password%@xxxxxxxxx ... webservice


kind regards,
Djek

User avatar
Marcus Tettmar
Site Admin
Posts: 7265
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: problem password protected feed json link

Post by Marcus Tettmar » Thu Sep 28, 2017 10:32 am

Actually you do NOT want to do that with HTTPRequest.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts