Unable to get OAuth2 Bearer token in Angular JS(ionic)


Hi I am trying to login my app using twitter for which i am using Oauth2 .I am getting response (token) when using postman tool.But same thing when i am doing in code(on local host as well as on server) or RestClient tool i am getting bellow error.–>

XMLHttpRequest cannot load https://api.twitter.com/oauth2/token. Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘’ is therefore not allowed access. The response had HTTP status code 400.

I have tried lots of solutions for this ,But nothing is working.Please let me know if iam missing something.It will be helpful.