api testing script using self-signed ssl cert and oauth