Trying to run a script, authentication problems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2012 01:13 AM
I'm trying script: http://wiki.servicenow.com/index.php?title=Importing_Data_Using_Import_Sets#Perl_Example
Command I run:
uploadafile.pl --url="https://demo00.service-now.com/sys_import.do?sysparm_import_set_tablename=test_import&sysparm_transf..." --uploadfile=c:/data/test_users.csv
However, everytime I try to run this script against demo environment I get error:
Authentication required!
This server could not verify that you are authorized to access the URL "/sys_import.do". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required. In case you are allowed to request the document, please check your user-id and password and try again.
Is this the correct way to supply credentials:
# setup basic authentication credentials
$ua->credentials(
'demo00.service-now.com:443',
'ServiceNow',
'admin' => 'admin'
);
I have verified that username is admin and password is admin.
BR,
M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2012 08:18 AM
You get this error when the script cannot reach the URL. Make sure you can ping the url from your test environment. Maybe your test environment requires you go through a proxy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2012 10:45 PM
Ping seems to work ok for our test, development and production environments.
Reply from 37.98.232.100: bytes=32 time=38ms TTL=241
>Maybe your test environment requires you go through a proxy?
How could I make sure that proxy is required in the test environment?
If proxy is used how should I modify the script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2012 10:31 PM
Problem was the Perl version.
5.16.1.1601 did not work in our instance, but 5.12.4.1205 worked.