I have an API for get token from paypal.
curl -v POST https://api.sandbox.paypal.com/v1/oauth2/token \\ -H "Accept: application/json" \\ -H &quo