Tool to use the Call of Duty API
Table of contents
- Commands
.\fetch_icons.ps1
Export icons from the CDN
.\fetch_icons.ps1 [[-ExportPath] <String>] [-CwIcons] [-MwIcons] [-Bo4Icons] [-WwiiIcons] [-OnlyPrestiges] [-AllGames] [-LittleIcons] [<CommonParameters>]
Export the CoD Prestige/Level icons from the CDN
-
-ExportPath <String>
The path where to save the icons -
-CwIcons
Download Black ops Cold War icons, included in AllGames -
-MwIcons
Download Modern Warfare 2019 icons, included in AllGames -
-Bo4Icons
Download Black ops 4 icons, included in AllGames -
-WwiiIcons
Download World War II icons, included in AllGames -
-OnlyPrestiges
Only download the prestige icons -
-AllGames
Download all the icons from each games -
-LittleIcons
Download non large icons (if available)
PS > .\fetch_icons.ps1 -AllGames
.\cod_login.ps1
Login to the Activision API
.\cod_login.ps1 [[-Username] <String>] [[-Password] <SecureString>] [[-SaveFile] <String>] [-ReturnLoginInformation] [<CommonParameters>]
Login to the Activision API and return login data into a file or in the pipeline
-
-Username <String>
The email/username to connect to your Activision account -
-Password <SecureString>
ASecureString
of your password to connect -
-SaveFile <String>
By default "login_data.json", where the login data are saved, useless if the -ReturnLoginInformation is set -
-ReturnLoginInformation
Return the login information into the pipeline
PS> $pass = Read-Host -AsSecureString
******************
PS> .\cod_login.ps1 -Username "[email protected]" -Password $pass
Register DEVICE_ID '****'...
Login...
Writing login tokens into 'login_data.json'
.\build_sso_websession.ps1
Build a session from the cod_login.ps1 output
.\build_sso_websession.ps1 [[-loginData] <Object>] [[-SaveFile] <String>] [[-CookieDomain] <String>] [<CommonParameters>]
Build a session from the cod_login.ps1 output
-
-loginData <Object>
Login data object, returned by cod_login.ps1 using the -ReturnLoginInformation switch -
-SaveFile <String>
Login save file, returned by default by cod_login.ps1 without using the -ReturnLoginInformation switch -
-CookieDomain <String>
The domain to match the cookies of the WebSession
PS> # cod_login.ps1 was already executed and a login_data.json file exists
PS> .\build_sso_websession.ps1
Headers : {[Authorization, bearer ****], [X_COD_DEVICE_ID, ****]}
Cookies : System.Net.CookieContainer
UseDefaultCredentials : False
Credentials :
Certificates :
UserAgent : cod-ate-worker
Proxy :
MaximumRedirection : -1
MaximumRetryCount : 0
RetryIntervalInSeconds : 0
.\fetch_bo4_data.ps1
Fetch Call of Duty Black Ops 4 data of a player
.\fetch_bo4_data.ps1 [[-UserName] <String>] [[-Platform] <String>] [[-Session] <Object>] [<CommonParameters>]
Fetch Call of Duty Black Ops 4 data of a player and output json, can fail if the user doesn't allow the share of his stats with the other
-
-UserName <String>
The username of the player -
-Platform <String> = "xbl", "battle", "steam", "psn"
The platform of the user -
-Session <Object>
The session to connect, null to generate a new one
PS>.\fetch_bo4_data.ps1 -UserName ATE48 -Platform xbl
Saving data https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/xbl/gamer/ATE48/profile/type/mp/ to output_account/xbl_ATE48_mp.json...
Saving data https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/xbl/gamer/ATE48/profile/type/blackout/ to output_account/xbl_ATE48_blackout.json...
Saving data https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/xbl/gamer/ATE48/profile/type/zombies/ to output_account/xbl_ATE48_zombies.json...