Skip to content
Keyhacks is a repository which shows quick ways in which API keys leaked by a bug bounty program can be checked to see if they're valid.
Branch: master
Clone or download
Latest commit 945a47b May 22, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. Add Square May 21, 2019

KeyHacks shows ways in which particular API keys found on a Bug Bounty Program can be used, to check if they are valid.

Table of Contents

Detailed Information

Slack Webhook

If the below command returns missing_text_or_fallback_or_attachments, it means that the URL is valid, any other responses would mean that the URL is invalid.

curl -s -X POST -H "Content-type: application/json" -d '{"text":""}' ""

Slack API token

curl -sX POST ""

SauceLabs Username and access Key


Facebook AppSecret

You can generate access tokens by visiting the URL below.

Facebook Access Token


Requires a custom token, and an API key.

  1. obtain ID token and refresh token from custom token and API key: curl -s -XPOST -H 'content-type: application/json' -d '{"custom_token":":custom_token"}' ''
  2. exchange ID token for auth token: curl -s -XPOST -H 'content-type: application/json' -d '{"idToken":":id_token"}''

Github Token

curl -s -u "hehe:TOKEN_HERE"
curl -s -H "Authorization: token TOKEN_HERE" "

Google Cloud Messaging

curl -s -X POST --header "Authorization: key=AI..." --header "Content-Type:application/json" '' -d '{"registration_ids":["1"]}'

GitHub private SSH key

SSH private keys can be tested against to see if they are registered against an existing user account. If the key exists the username corresponding to the key will be provided. (source)

$ ssh -i <path to SSH private key> -T
Hi <username>! You've successfully authenticated, but GitHub does not provide shell access.

Twilio Account_sid and Auth token


Twitter API Secret

curl -u 'API key:API secret key' --data 'grant_type=client_credentials' ''

Twitter Bearer token

curl --request GET --url --header 'authorization: Bearer TOKEN'

Deviant Art Secret

curl -d grant_type=client_credentials -d client_id=ID_HERE -d client_secret=mysecret

Deviant Art Access Token

curl -d access_token=Alph4num3r1ct0k3nv4lu3

Pendo Integration Key

curl -X GET -H 'content-type: application/json' -H 'x-pendo-integration-key:KEY_HERE'
curl -X GET -H 'content-type: application/json' -H 'x-pendo-integration-key:KEY_HERE'

SendGrid API Token

curl -X "GET" "" -H "Authorization: Bearer SENDGRID_TOKEN-HERE" -H "Content-Type: application/json"



app id / client secret: sq0[a-z]{3}-[0-9A-Za-z\-_]{22,43} auth token: EAAA[a-zA-Z0-9]{60}

Test App id & client secret:

curl "" -d '{"access_token":"[RANDOM_STRING]","client_id":"[APP_ID]"}'  -H "Content-Type: application/json" -H "Authorization: Client [CLIENT_SECRET]"



Not valid:

  "message": "Not Authorized",
  "type": "service.not_authorized"

Test Auth token:

curl -H "Authorization: Bearer [AUHT_TOKEN]"


{"locations":[{"id":"CBASELqoYPXr7RtT-9BRMlxGpfcgAQ","name":"Coffee \u0026 Toffee SF","address":{"address_line_1":"1455 Market Street","locality":"San Francisco","administrative_district_level_1":"CA","postal_code":"94103","country":"US"},"timezone":"America/Los_Angeles"........

Not valid:

{"errors":[{"category":"AUTHENTICATION_ERROR","code":"UNAUTHORIZED","detail":"This request could not be authorized."}]}

Dropbox API

curl -X POST --header "Authorization: Bearer TOKEN_HERE"

AWS Access Key ID and Secret

Add the new access_key_id and secret within ~/.aws/credentials file as a new user (

$ aws s3 ls --profile username_picked
$ aws s3 cp test.txt s3://bucket_belonging_to_the_company --profile username_picked

MailGun Private Key

curl --user 'api:key-PRIVATEKEYHERE' ""

Microsoft Azure Tenant


CLIENT_ID: [0-9a-z\-]{36}
CLIENT_SECRET: [0-9A-Za-z\+\=]{40,50}
TENANT_ID: [0-9a-z\-]{36}


curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'client_id=<CLIENT_ID>&<CLIENT_SECRET>&grant_type=client_credentials' '<TENANT_ID>/oauth2/v2.0/token'

Microsoft Shared Access Signatures (SAS)

The following powershell can be used to test a Shared Access Signature Token:

static void UseAccountSAS(string sasToken)
    // Create new storage credentials using the SAS token.
    StorageCredentials accountSAS = new StorageCredentials(sasToken);
    // Use these credentials and the account name to create a Blob service client.
    CloudStorageAccount accountWithSAS = new CloudStorageAccount(accountSAS, "account-name", endpointSuffix: null, useHttps: true);
    CloudBlobClient blobClientWithSAS = accountWithSAS.CreateCloudBlobClient();

    // Now set the service properties for the Blob client created with the SAS.
    blobClientWithSAS.SetServiceProperties(new ServiceProperties()
        HourMetrics = new MetricsProperties()
            MetricsLevel = MetricsLevel.ServiceAndApi,
            RetentionDays = 7,
            Version = "1.0"
        MinuteMetrics = new MetricsProperties()
            MetricsLevel = MetricsLevel.ServiceAndApi,
            RetentionDays = 7,
            Version = "1.0"
        Logging = new LoggingProperties()
            LoggingOperations = LoggingOperations.All,
            RetentionDays = 14,
            Version = "1.0"

    // The permissions granted by the account SAS also permit you to retrieve service properties.
    ServiceProperties serviceProperties = blobClientWithSAS.GetServiceProperties();

Heroku API key

curl -X POST -H "Accept: application/vnd.heroku+json; version=3" -H "Authorization: Bearer API_KEY_HERE"

Salesforce API key

curl -H 'Authorization: Bearer access_token_here'

Algolia API key

Be cautious when running this command, since the payload might execute within an administrative environment, depending on what index you are editing the highlightPreTag of. It's recommended to use a more silent payload (such as XSS Hunter) to prove the possible cross-site scripting attack.

curl --request PUT \
  --url https://<application-id><example-index>/settings \
  --header 'content-type: application/json' \
  --header 'x-algolia-api-key: <example-key>' \
  --header 'x-algolia-application-id: <example-application-id>' \
  --data '{"highlightPreTag": "<script>alert(1);</script>"}'

Zapier Webhook Token

curl -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"name":"streaak"}' "webhook_url_here"

pagerduty API token

curl -H "Accept: application/vnd.pagerduty+json;version=2"  -H "Authorization: Token token=TOKEN_HERE" -X GET  ""

BrowserStack ACCESSKEY


Google Maps API key

Visit the following URL to check for validity,-73.998672&zoom=12&size=2500x2000&maptype=roadmap&key=KEY_HERE

Branch.IO Key and Secret

Visit the following URL to check for validity Access token

Visit the following URL to check for validity

Buildkite Access token

curl -H "Authorization: Bearer ACCESS_TOKEN" \

Asana Access token

curl -H "Authorization: Bearer ACCESS_TOKEN"

Zendesk Access token

curl https://{subdomain} \
  -H "Authorization: Bearer ACCESS_TOKEN"

MailChimp API Key

curl --request GET --url 'https://<dc>' --user 'anystring:<API_KEY>' --include

WPEngine API Key

This issue can be further exploited by checking out @hateshape 's gist here

curl ""

DataDog API key

curl "<api_key>&application_key=<application_key>"

Travis CI API token

curl -H "Travis-API-Version: 3" -H "Authorization: token <TOKEN>"

WakaTime API Key

curl ""


I welcome contributions from the public.

Using the issue tracker 💡

The issue tracker is the preferred channel for bug reports and features requests.

Issues and labels 🏷

The bug tracker utilizes several labels to help organize and identify issues.

Guidelines for bug reports 🐛

Use the GitHub issue search — check if the issue has already been reported.

⚠ Legal Disclaimer

This project is made for educational and ethical testing purposes only. Usage of this tool for attacking targets without prior mutual consent is illegal. Developers assume no liability and are not responsible for any misuse or damage caused by this tool.

You can’t perform that action at this time.