You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# @raycast.description This script command generates a unique private @duck.com email address.
# @raycast.author Rediwed
# @raycast.authorURL github.com/Rediwed
on run
set prefix to do shell script "curl -X POST https://quack.duckduckgo.com/api/email/addresses --header 'Authorization: Bearer " & getAuthorizationID() & "'"
if text 3 through 9 of prefix is "address" then
set uniqueAddress to text 13 through 20 of prefix & "@duck.com"
set the clipboard to uniqueAddress
return uniqueAddress & " copied to clipboard!"
else
tell me to error "An error has occured: " & prefix
end if
end run
on getAuthorizationID()
try
return do shell script "defaults read com.dpe.ddgEmailProtection AuthorizationID"
on error
tell me to error "Authorization ID not set, please run configure script command"