Hi Alex, thanks for your answer,
1)
This is the error code when I pass parameters as header or params:
Response: {“code”:”rest_cannot_create”,”message”:”Sorry, you are not allowed to create posts as this user.”,”data”:{“status”:401}}
Although I have set it as read/write
I read somewhere that request with http couldn’t be passed as parameters or headers. That’s why i initially tried using Oauth lib with passing auth = Oauth {consumer_,consumer:secret}