/** * Check apikey stats permissions * * @param string $apikey sendgrid apikey * @return bool */ public static function check_api_key_stats($apikey) { $required_scopes = array('stats.read', 'categories.stats.read', 'categories.stats.sums.read'); return Sendgrid_Tools::check_api_key_scopes($apikey, $required_scopes); }
/** * Check apikey marketing campaigns permissions * * @param string $apikey sendgrid apikey * * @return bool */ public static function check_api_key_mc($apikey) { $required_scopes = array('marketing_campaigns.create', 'marketing_campaigns.read', 'marketing_campaigns.update', 'marketing_campaigns.delete'); return Sendgrid_Tools::check_api_key_scopes($apikey, $required_scopes); }