- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2016 02:45 PM
I have a curl command which is running perfect, I want to convert this into a REST Outbound Message, I 'm getting 500 [Internal Server Error]return code
curl -u username:123456abctoken https://endpointurl.com/api/methodname
In the REST message configuration, I see that I can match Endpoint to "https://endpointurl.com/api/methodname"
How do I pass "username" and "123456abctoken" values, that we are passing in the CURL?
Since I'm using Token and not password, Basic auth is not working.
Thanks
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2016 11:13 AM
The issue was with ability to reach the server. The endpoint URL was not accessible from outside network.
I got it working using Basic Auth where user name is same as user name in curl and in the password field I entered Token, but the critical point was I had to use Mid Server.
By using mid server, I actually can see the outbound message and inbound response and the reason its failing etc, by looking at the ecc queue with topic "RESTProbe".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2016 10:19 PM
Hi Snowcone,
Is it possible there is some other issue?
error code 500 is often generated after authentication has succeeded.
Best Regards
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2016 09:12 AM
You need to create some Basic Auth Credentials for your service in the "sys_auth_profile_basic" table, put the token in the password field. In the Outbound REST Message set Auth Type to Basic, and then select the credentials you created with your token in the Basic Auth Profile box.
I tested this method against OneTimeSecret's endpoint which passes the token the same way you mention with curl and it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2016 11:13 AM
The issue was with ability to reach the server. The endpoint URL was not accessible from outside network.
I got it working using Basic Auth where user name is same as user name in curl and in the password field I entered Token, but the critical point was I had to use Mid Server.
By using mid server, I actually can see the outbound message and inbound response and the reason its failing etc, by looking at the ecc queue with topic "RESTProbe".