Oracle Webcenter REST API Authorization

Sometimes, we need to connect to a rest service to get the resource index. For example connecting to http://webcenter.us.oracle.com/rest/api/resourceIndex.

If you do a direct connection to the rest service, a login box will appear. So we can bypass it instead to do a login with a header.

Step 1: Base64 encode the following YOUR_USERNAME:YOUR_PASSWORD. Note the colon inbetween.

Step 2: Create a header with the following name: Authorization and value: BASE64_ENCODED_USERNAMEANDPASSWORD.

Send it over and presto!

Reference: http://docs.oracle.com/cd/E23549_01/webcenter.1111/e10148/jpsdg_rest_api.htm#BABFFEAI

Leave a comment