REST Invoke API returns HTTP 401 Unauthorized