fixing secured api