Removes a stored value by key.
class PropertiesService method .deleteProperty()
PropertiesService is the Apps Script service.
.deleteProperty() is the method name you will see after a dot in your code.
What it does
Why it's used
- Clear old OAuth state or deprecated keys.
- Reset setup when someone disconnects an integration.
Common errors
- Forgetting parentheses on deleteProperty. Write PropertiesService.deleteProperty(), not PropertiesService.deleteProperty or deleteProperty by itself.
- Skipping dots between chained calls. Each step needs a dot, like PropertiesService.deleteProperty().
- Adding spaces where they do not belong. Write PropertiesService.deleteProperty(), not PropertiesService .deleteProperty(), PropertiesService.deleteProperty (), or PropertiesService . deleteProperty().
- Wrong capitalization. Use PropertiesService and deleteProperty, not propertiesservice or deleteproperty.
Explore
Related methods
-
.setProperty()
Saves a single key-value pair.
-
.getProperty()
Reads a single stored value by key.
-
.getProperties()
Returns all stored key-value pairs.
-
.setProperties()
Saves multiple key-value pairs at once.
-
.getUserProperties()
Returns key-value storage private to the current user.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.