Tag: API

Query Supercell Clash of Clans API with PowerShell

This is pretty simple example how to query Clash Of Clans API with PowerShell.

First you need to create your account at https://developer.clashofclans.com/#/

Second you need to generate new key ($APIKey) for your IP address.

You can use the Documentation section to get the URL variable depending on what exact info you want to pull.

Get clan members list:

#Get members
$APIkey = ""
$url = "https://api.clashofclans.com/v1/clans/%239yQRPL2C/members"
$headers = @{Authorization = "Bearer:$APIkey"}
$membersList = Invoke-RestMethod -Uri $url -Headers $headers
$membersList

 

Advertisements