curl --request POST \
--url https://api.iotools.cloud/v1/tool/api-secret-scanner-redactor \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"inputText": "# Example configuration (fake secrets)\nAWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE\naws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\nGITHUB_TOKEN=ghp_1234567890abcdefghijklmnopqrstuvwxyz\nSTRIPE_KEY=sk_live_4eC39HqLyjWDarjtT1zdp7dc\nGOOGLE_API_KEY=AIzaSyD-1234567890abcdefghijklmnopqrstu\nDATABASE_URL=postgres://admin:s3cr3tP%40ss@db.example.com:5432/app\nJWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U\napi_key: 'a1b2c3d4e5f6g7h8i9j0klmno'\nSLACK_WEBHOOK=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
"redactionStyle": "label",
"genericScan": "true"
}
EOF{
"tool": "api-secret-scanner-redactor",
"tool_version": "1.0.1",
"outputs": {
"summary": [
{
"type": "Total",
"count": "9"
},
{
"type": "AWS Access Key ID",
"count": "1"
},
{
"type": "AWS Secret Access Key",
"count": "1"
},
{
"type": "GitHub Token",
"count": "1"
},
{
"type": "Stripe Secret Key",
"count": "1"
},
{
"type": "Google API Key",
"count": "1"
},
{
"type": "Connection String Credentials",
"count": "1"
},
{
"type": "JSON Web Token (JWT)",
"count": "1"
},
{
"type": "Generic Secret Assignment",
"count": "1"
},
{
"type": "Slack Webhook",
"count": "1"
}
],
"findings": [
{
"line": "2",
"type": "AWS Access Key ID",
"confidence": "high",
"masked-preview": "AKIA…••••••••…MPLE"
},
{
"line": "3",
"type": "AWS Secret Access Key",
"confidence": "medium",
"masked-preview": "wJal…••••••••…EKEY"
},
{
"line": "4",
"type": "GitHub Token",
"confidence": "high",
"masked-preview": "ghp_…••••••••…wxyz"
},
{
"line": "5",
"type": "Stripe Secret Key",
"confidence": "high",
"masked-preview": "sk_l…••••••••…p7dc"
},
{
"line": "6",
"type": "Google API Key",
"confidence": "high",
"masked-preview": "AIza…••••••••…rstu"
},
{
"line": "7",
"type": "Connection String Credentials",
"confidence": "medium",
"masked-preview": "s3cr…••••…40ss"
},
{
"line": "8",
"type": "JSON Web Token (JWT)",
"confidence": "high",
"masked-preview": "eyJh…••••••••…sR8U"
},
{
"line": "9",
"type": "Generic Secret Assignment",
"confidence": "low",
"masked-preview": "a1b2…••••••••…lmno"
},
{
"line": "10",
"type": "Slack Webhook",
"confidence": "high",
"masked-preview": "http…••••••••…XXXX"
}
],
"redactedOutput": "# Example configuration (fake secrets)\nAWS_ACCESS_KEY_ID=[REDACTED_AWS_ACCESS_KEY_ID]\naws_secret_access_key = [REDACTED_AWS_SECRET_ACCESS_KEY]\nGITHUB_TOKEN=[REDACTED_GITHUB_TOKEN]\nSTRIPE_KEY=[REDACTED_STRIPE_SECRET_KEY]\nGOOGLE_API_KEY=[REDACTED_GOOGLE_API_KEY]\nDATABASE_URL=postgres://admin:[REDACTED_CONNECTION_STRING_CREDENTIALS]@db.example.com:5432/app\nJWT=[REDACTED_JSON_WEB_TOKEN_JWT]\napi_key: '[REDACTED_GENERIC_SECRET_ASSIGNMENT]'\nSLACK_WEBHOOK=[REDACTED_SLACK_WEBHOOK]"
},
"credits_used": 3,
"credits_remaining": null
}Utilities
API Secret Scanner & Redactor
Scan code, config files, or logs for hardcoded API keys, tokens, and passwords — over 20 provider-specific patterns plus optional generic secret detection — and produce a redacted copy.
POST
/
v1
/
tool
/
api-secret-scanner-redactor
curl --request POST \
--url https://api.iotools.cloud/v1/tool/api-secret-scanner-redactor \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"inputText": "# Example configuration (fake secrets)\nAWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE\naws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\nGITHUB_TOKEN=ghp_1234567890abcdefghijklmnopqrstuvwxyz\nSTRIPE_KEY=sk_live_4eC39HqLyjWDarjtT1zdp7dc\nGOOGLE_API_KEY=AIzaSyD-1234567890abcdefghijklmnopqrstu\nDATABASE_URL=postgres://admin:s3cr3tP%40ss@db.example.com:5432/app\nJWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U\napi_key: 'a1b2c3d4e5f6g7h8i9j0klmno'\nSLACK_WEBHOOK=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
"redactionStyle": "label",
"genericScan": "true"
}
EOF{
"tool": "api-secret-scanner-redactor",
"tool_version": "1.0.1",
"outputs": {
"summary": [
{
"type": "Total",
"count": "9"
},
{
"type": "AWS Access Key ID",
"count": "1"
},
{
"type": "AWS Secret Access Key",
"count": "1"
},
{
"type": "GitHub Token",
"count": "1"
},
{
"type": "Stripe Secret Key",
"count": "1"
},
{
"type": "Google API Key",
"count": "1"
},
{
"type": "Connection String Credentials",
"count": "1"
},
{
"type": "JSON Web Token (JWT)",
"count": "1"
},
{
"type": "Generic Secret Assignment",
"count": "1"
},
{
"type": "Slack Webhook",
"count": "1"
}
],
"findings": [
{
"line": "2",
"type": "AWS Access Key ID",
"confidence": "high",
"masked-preview": "AKIA…••••••••…MPLE"
},
{
"line": "3",
"type": "AWS Secret Access Key",
"confidence": "medium",
"masked-preview": "wJal…••••••••…EKEY"
},
{
"line": "4",
"type": "GitHub Token",
"confidence": "high",
"masked-preview": "ghp_…••••••••…wxyz"
},
{
"line": "5",
"type": "Stripe Secret Key",
"confidence": "high",
"masked-preview": "sk_l…••••••••…p7dc"
},
{
"line": "6",
"type": "Google API Key",
"confidence": "high",
"masked-preview": "AIza…••••••••…rstu"
},
{
"line": "7",
"type": "Connection String Credentials",
"confidence": "medium",
"masked-preview": "s3cr…••••…40ss"
},
{
"line": "8",
"type": "JSON Web Token (JWT)",
"confidence": "high",
"masked-preview": "eyJh…••••••••…sR8U"
},
{
"line": "9",
"type": "Generic Secret Assignment",
"confidence": "low",
"masked-preview": "a1b2…••••••••…lmno"
},
{
"line": "10",
"type": "Slack Webhook",
"confidence": "high",
"masked-preview": "http…••••••••…XXXX"
}
],
"redactedOutput": "# Example configuration (fake secrets)\nAWS_ACCESS_KEY_ID=[REDACTED_AWS_ACCESS_KEY_ID]\naws_secret_access_key = [REDACTED_AWS_SECRET_ACCESS_KEY]\nGITHUB_TOKEN=[REDACTED_GITHUB_TOKEN]\nSTRIPE_KEY=[REDACTED_STRIPE_SECRET_KEY]\nGOOGLE_API_KEY=[REDACTED_GOOGLE_API_KEY]\nDATABASE_URL=postgres://admin:[REDACTED_CONNECTION_STRING_CREDENTIALS]@db.example.com:5432/app\nJWT=[REDACTED_JSON_WEB_TOKEN_JWT]\napi_key: '[REDACTED_GENERIC_SECRET_ASSIGNMENT]'\nSLACK_WEBHOOK=[REDACTED_SLACK_WEBHOOK]"
},
"credits_used": 3,
"credits_remaining": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Tool output
Show child attributes
Show child attributes
The tool's slug, echoing the {slug} in the request path.
Output-contract version for this tool.
Credits this call consumed, after any settlement refund. 0 when metering is disabled.
Credits left in the current monthly allowance, or null when metering is disabled.
Correlation id, also sent as x-request-id.
Was this page helpful?
⌘I