He may have been inspired to tell what God revealed to him and the Church refused to hear it is another possibility.
“Inspiration” is not his job.