I am getting a 401 error at service call out can you please help.
trace below :
Proxy Request Flow Started
Name
myRequest organization.name dynamicapi servicecallout.requesturi /services/20/api/testkey.pl?orgname=dynamicapi
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>401 Authorization Required</title> </head><body> <h1>Authorization Required</h1> <p>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.</p> <hr> <address>Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g Server at .....
Authorization
Body
action PAUSE enforcement request Identifier fault internal false loadbalancing.failedservers loadbalancing.isfallback false loadbalancing.targetserver TS1 result true ServiceCallout.response <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>401 Authorization Required</title> </head><body> <h1>Authorization Required</h1> <p>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.</p> <hr> <address>Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g Server at ..... stepDefinition-async false stepDefinition-continueOnError false stepDefinition-displayName Callout Jokeindex stepDefinition-enabled true stepDefinition-name Callout-Jokeindex stepDefinition-type servicecallout type ServiceCalloutExecutionOutput from all Transactions Filters
Solved! Go to Solution.
Remember this is behind the basic auth that Jokeindex uses -- make sure that you're passing the same Authorization: Basic xxx that we did in one of the first policies we attached (Add Auth Header in the AssignMessage policy). You'll have to add that to the header of the callout just like you would have to add it to hitting any resource at jokeindex.com/services/20/api
Hope that helps.
Remember this is behind the basic auth that Jokeindex uses -- make sure that you're passing the same Authorization: Basic xxx that we did in one of the first policies we attached (Add Auth Header in the AssignMessage policy). You'll have to add that to the header of the callout just like you would have to add it to hitting any resource at jokeindex.com/services/20/api
Hope that helps.
Thank you Michael ! I had put a incorrect Authorization Basic in my service callout code.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |