I have searched with the error which I found, Did not find any matching questions. So posting question. Appreciate if some one provides some pointers to proceed.
My
You'll find that this document is a better set of instructions for app-only apps.
There are two issues from your description that stand out.