List all secrets

This will return all secrets, along with their id and created_at time. The value of the secret will never be shown

KeyDescription
VONAGE_API_KEY

Your Vonage API key (see it on your dashboard).

VONAGE_API_SECRET

Your Vonage API secret (also available on your dashboard).

ACCOUNT_ID

The account ID to target

Write the code

Add the following to list-secrets.sh:

curl "https://api.nexmo.com/accounts/$ACCOUNT_ID/secrets" -H 'Content-Type: application/json' \
    -u "$VONAGE_API_KEY:$VONAGE_API_SECRET"

View full source

Run your code

Save this file to your machine and run it:

bash list-secrets.sh