Call of Duty API

AccountManagement

fetchUserAccountsByIdentity

Get user accounts by identity (v2)

Returns user accounts by platform and username. Default version: v2


/papi-client/crm/cod/{version}/accounts/search/platform/{platform}/gamer/{username}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/accounts/search/platform/{platform}/gamer/{username}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountManagementApi;

import java.io.File;
import java.util.*;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchUserAccountsByIdentity(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#fetchUserAccountsByIdentity");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchUserAccountsByIdentity(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#fetchUserAccountsByIdentity");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

AccountManagementApi *apiInstance = [[AccountManagementApi alloc] init];

// Get user accounts by identity (v2)
[apiInstance fetchUserAccountsByIdentityWith:version
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.AccountManagementApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchUserAccountsByIdentity(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchUserAccountsByIdentityExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new AccountManagementApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get user accounts by identity (v2)
                ApiResponse result = apiInstance.fetchUserAccountsByIdentity(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountManagementApi.fetchUserAccountsByIdentity: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiAccountManagementApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->fetchUserAccountsByIdentity($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountManagementApi->fetchUserAccountsByIdentity: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountManagementApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AccountManagementApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->fetchUserAccountsByIdentity(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountManagementApi->fetchUserAccountsByIdentity: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountManagementApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get user accounts by identity (v2)
    api_response = api_instance.fetch_user_accounts_by_identity(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountManagementApi->fetchUserAccountsByIdentity: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchUserAvatarByUno

Get user avatar by UNO (v2)

Returns user avatar by UNO ID. Default version: v2


/papi-client/crm/cod/{version}/platform/{platform}/uno/{unoId}/avatar

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/platform/{platform}/uno/{unoId}/avatar?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountManagementApi;

import java.io.File;
import java.util.*;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.fetchUserAvatarByUno(version, platform, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#fetchUserAvatarByUno");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.fetchUserAvatarByUno(version, platform, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#fetchUserAvatarByUno");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *unoId = unoId_example; // UNO ID for user identification

AccountManagementApi *apiInstance = [[AccountManagementApi alloc] init];

// Get user avatar by UNO (v2)
[apiInstance fetchUserAvatarByUnoWith:version
    platform:platform
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.AccountManagementApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchUserAvatarByUno(version, platform, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchUserAvatarByUnoExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new AccountManagementApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Get user avatar by UNO (v2)
                ApiResponse result = apiInstance.fetchUserAvatarByUno(version, platform, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountManagementApi.fetchUserAvatarByUno: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiAccountManagementApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->fetchUserAvatarByUno($version, $platform, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountManagementApi->fetchUserAvatarByUno: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountManagementApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AccountManagementApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->fetchUserAvatarByUno(version => $version, platform => $platform, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountManagementApi->fetchUserAvatarByUno: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountManagementApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Get user avatar by UNO (v2)
    api_response = api_instance.fetch_user_avatar_by_uno(version, platform, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountManagementApi->fetchUserAvatarByUno: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchUserSearchByIdentity

Search user by identity (v2)

Search for users by platform and username. Default version: v2


/papi-client/crm/cod/{version}/platform/{platform}/username/{username}/search

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/platform/{platform}/username/{username}/search?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountManagementApi;

import java.io.File;
import java.util.*;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchUserSearchByIdentity(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#fetchUserSearchByIdentity");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchUserSearchByIdentity(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#fetchUserSearchByIdentity");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

AccountManagementApi *apiInstance = [[AccountManagementApi alloc] init];

// Search user by identity (v2)
[apiInstance fetchUserSearchByIdentityWith:version
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.AccountManagementApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchUserSearchByIdentity(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchUserSearchByIdentityExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new AccountManagementApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Search user by identity (v2)
                ApiResponse result = apiInstance.fetchUserSearchByIdentity(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountManagementApi.fetchUserSearchByIdentity: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiAccountManagementApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->fetchUserSearchByIdentity($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountManagementApi->fetchUserSearchByIdentity: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountManagementApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AccountManagementApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->fetchUserSearchByIdentity(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountManagementApi->fetchUserSearchByIdentity: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountManagementApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Search user by identity (v2)
    api_response = api_instance.fetch_user_search_by_identity(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountManagementApi->fetchUserSearchByIdentity: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchUserTitleIdentitiesByUno

Get user title identities by UNO (v2)

Returns user's title identities by UNO ID. Default version: v2


/papi-client/crm/cod/{version}/identities/platform/uno/id/{unoId}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/identities/platform/uno/id/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountManagementApi;

import java.io.File;
import java.util.*;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.fetchUserTitleIdentitiesByUno(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#fetchUserTitleIdentitiesByUno");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.fetchUserTitleIdentitiesByUno(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#fetchUserTitleIdentitiesByUno");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

AccountManagementApi *apiInstance = [[AccountManagementApi alloc] init];

// Get user title identities by UNO (v2)
[apiInstance fetchUserTitleIdentitiesByUnoWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.AccountManagementApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchUserTitleIdentitiesByUno(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchUserTitleIdentitiesByUnoExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new AccountManagementApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Get user title identities by UNO (v2)
                ApiResponse result = apiInstance.fetchUserTitleIdentitiesByUno(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountManagementApi.fetchUserTitleIdentitiesByUno: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiAccountManagementApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->fetchUserTitleIdentitiesByUno($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountManagementApi->fetchUserTitleIdentitiesByUno: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountManagementApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AccountManagementApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->fetchUserTitleIdentitiesByUno(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountManagementApi->fetchUserTitleIdentitiesByUno: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountManagementApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Get user title identities by UNO (v2)
    api_response = api_instance.fetch_user_title_identities_by_uno(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountManagementApi->fetchUserTitleIdentitiesByUno: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getAccountDetails

Get account details by platform (v2)

Returns account details for a specific platform and username. Default version: v2


/papi-client/crm/cod/{version}/accounts/platform/{platform}/gamer/{username}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/accounts/platform/{platform}/gamer/{username}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountManagementApi;

import java.io.File;
import java.util.*;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            inline_response_200 result = apiInstance.getAccountDetails(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#getAccountDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            inline_response_200 result = apiInstance.getAccountDetails(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#getAccountDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

AccountManagementApi *apiInstance = [[AccountManagementApi alloc] init];

// Get account details by platform (v2)
[apiInstance getAccountDetailsWith:version
    platform:platform
    username:username
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.AccountManagementApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccountDetails(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAccountDetailsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new AccountManagementApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get account details by platform (v2)
                inline_response_200 result = apiInstance.getAccountDetails(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountManagementApi.getAccountDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiAccountManagementApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->getAccountDetails($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountManagementApi->getAccountDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountManagementApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AccountManagementApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->getAccountDetails(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountManagementApi->getAccountDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountManagementApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get account details by platform (v2)
    api_response = api_instance.get_account_details(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountManagementApi->getAccountDetails: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 404 - Resource not found

Status: 500 - Internal server error


getUserAccounts

Get all linked accounts (v2)

Returns all linked platform accounts for the user. Default version: v2


/papi-client/crm/cod/{version}/accounts

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/accounts?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountManagementApi;

import java.io.File;
import java.util.*;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            inline_response_200 result = apiInstance.getUserAccounts(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#getUserAccounts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            inline_response_200 result = apiInstance.getUserAccounts(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#getUserAccounts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

AccountManagementApi *apiInstance = [[AccountManagementApi alloc] init];

// Get all linked accounts (v2)
[apiInstance getUserAccountsWith:version
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.AccountManagementApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserAccounts(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserAccountsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new AccountManagementApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Get all linked accounts (v2)
                inline_response_200 result = apiInstance.getUserAccounts(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountManagementApi.getUserAccounts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiAccountManagementApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->getUserAccounts($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountManagementApi->getUserAccounts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountManagementApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AccountManagementApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->getUserAccounts(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountManagementApi->getUserAccounts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountManagementApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Get all linked accounts (v2)
    api_response = api_instance.get_user_accounts(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountManagementApi->getUserAccounts: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getUserAvatar

Get user avatar (v2)

Returns the user's avatar for a specific platform. Default version: v2


/papi-client/crm/cod/{version}/platform/{platform}/gamer/{username}/avatar

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/platform/{platform}/gamer/{username}/avatar?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountManagementApi;

import java.io.File;
import java.util.*;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            AccountInfoResponse result = apiInstance.getUserAvatar(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#getUserAvatar");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            AccountInfoResponse result = apiInstance.getUserAvatar(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#getUserAvatar");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

AccountManagementApi *apiInstance = [[AccountManagementApi alloc] init];

// Get user avatar (v2)
[apiInstance getUserAvatarWith:version
    platform:platform
    username:username
              completionHandler: ^(AccountInfoResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.AccountManagementApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserAvatar(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserAvatarExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new AccountManagementApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get user avatar (v2)
                AccountInfoResponse result = apiInstance.getUserAvatar(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountManagementApi.getUserAvatar: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiAccountManagementApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->getUserAvatar($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountManagementApi->getUserAvatar: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountManagementApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AccountManagementApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->getUserAvatar(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountManagementApi->getUserAvatar: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountManagementApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get user avatar (v2)
    api_response = api_instance.get_user_avatar(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountManagementApi->getUserAvatar: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 404 - Avatar not found or not available for this provider

Status: 500 - Internal server error


getUserTitleIdentities

Get user title identities (v2)

Returns the user's title identities across all games. Default version: v2


/papi-client/crm/cod/{version}/identities

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/identities?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountManagementApi;

import java.io.File;
import java.util.*;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            AccountInfoResponse result = apiInstance.getUserTitleIdentities(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#getUserTitleIdentities");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            AccountInfoResponse result = apiInstance.getUserTitleIdentities(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#getUserTitleIdentities");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

AccountManagementApi *apiInstance = [[AccountManagementApi alloc] init];

// Get user title identities (v2)
[apiInstance getUserTitleIdentitiesWith:version
              completionHandler: ^(AccountInfoResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.AccountManagementApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserTitleIdentities(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserTitleIdentitiesExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new AccountManagementApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Get user title identities (v2)
                AccountInfoResponse result = apiInstance.getUserTitleIdentities(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountManagementApi.getUserTitleIdentities: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiAccountManagementApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->getUserTitleIdentities($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountManagementApi->getUserTitleIdentities: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountManagementApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AccountManagementApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->getUserTitleIdentities(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountManagementApi->getUserTitleIdentities: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountManagementApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Get user title identities (v2)
    api_response = api_instance.get_user_title_identities(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountManagementApi->getUserTitleIdentities: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


BanCheck

checkBanStatus

Check ban status for authenticated account (v2)

Checks the ban status for the currently authenticated account using session cookies. Requires prior reCAPTCHA verification and valid Activision session cookies. Note: This endpoint only works for the account that is currently authenticated via cookies. Default version: v2


/bans/{version}/appeal

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/bans/{version}/appeal?g-cc="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BanCheckApi;

import java.io.File;
import java.util.*;

public class BanCheckApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        BanCheckApi apiInstance = new BanCheckApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String locale = locale_example; // String | Locale for response
        String gCc = gCc_example; // String | Google reCAPTCHA verification token
        try {
            BanCheckResponse result = apiInstance.checkBanStatus(version, locale, gCc);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BanCheckApi#checkBanStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BanCheckApi;

public class BanCheckApiExample {

    public static void main(String[] args) {
        BanCheckApi apiInstance = new BanCheckApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String locale = locale_example; // String | Locale for response
        String gCc = gCc_example; // String | Google reCAPTCHA verification token
        try {
            BanCheckResponse result = apiInstance.checkBanStatus(version, locale, gCc);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BanCheckApi#checkBanStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *locale = locale_example; // Locale for response
String *gCc = gCc_example; // Google reCAPTCHA verification token

BanCheckApi *apiInstance = [[BanCheckApi alloc] init];

// Check ban status for authenticated account (v2)
[apiInstance checkBanStatusWith:version
    locale:locale
    gCc:gCc
              completionHandler: ^(BanCheckResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.BanCheckApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var locale = locale_example; // {{String}} Locale for response
var gCc = gCc_example; // {{String}} Google reCAPTCHA verification token

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.checkBanStatus(version, locale, gCc, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class checkBanStatusExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new BanCheckApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var locale = locale_example;  // String | Locale for response
            var gCc = gCc_example;  // String | Google reCAPTCHA verification token

            try
            {
                // Check ban status for authenticated account (v2)
                BanCheckResponse result = apiInstance.checkBanStatus(version, locale, gCc);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BanCheckApi.checkBanStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiBanCheckApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$locale = locale_example; // String | Locale for response
$gCc = gCc_example; // String | Google reCAPTCHA verification token

try {
    $result = $api_instance->checkBanStatus($version, $locale, $gCc);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BanCheckApi->checkBanStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BanCheckApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::BanCheckApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $locale = locale_example; # String | Locale for response
my $gCc = gCc_example; # String | Google reCAPTCHA verification token

eval { 
    my $result = $api_instance->checkBanStatus(version => $version, locale => $locale, gCc => $gCc);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BanCheckApi->checkBanStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BanCheckApi()
version = version_example # String | API version (v1, v2, v3, v4)
locale = locale_example # String | Locale for response
gCc = gCc_example # String | Google reCAPTCHA verification token

try: 
    # Check ban status for authenticated account (v2)
    api_response = api_instance.check_ban_status(version, locale, gCc)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BanCheckApi->checkBanStatus: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
locale*
String
Locale for response
Required
Query parameters
Name Description
g-cc*
String
Google reCAPTCHA verification token
Required

Responses

Status: 200 - Successful ban status check

Status: 400 - Bad request - invalid reCAPTCHA token

Status: 401 - Authentication required

Status: 500 - Internal server error


Community

fetchPlayerCommunityMap

Get player community map (v1)

Returns community map data availability. Default version: v1


/papi-client/ce/{version}/title/{title}/platform/{platform}/gameType/{gameMode}/communityMapData/availability

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/ce/{version}/title/{title}/platform/{platform}/gameType/{gameMode}/communityMapData/availability?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CommunityApi;

import java.io.File;
import java.util.*;

public class CommunityApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        CommunityApi apiInstance = new CommunityApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String gameMode = gameMode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.fetchPlayerCommunityMap(version, title, platform, gameMode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommunityApi#fetchPlayerCommunityMap");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CommunityApi;

public class CommunityApiExample {

    public static void main(String[] args) {
        CommunityApi apiInstance = new CommunityApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String gameMode = gameMode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.fetchPlayerCommunityMap(version, title, platform, gameMode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommunityApi#fetchPlayerCommunityMap");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *gameMode = gameMode_example; // Game mode

CommunityApi *apiInstance = [[CommunityApi alloc] init];

// Get player community map (v1)
[apiInstance fetchPlayerCommunityMapWith:version
    title:title
    platform:platform
    gameMode:gameMode
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.CommunityApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var gameMode = gameMode_example; // {{String}} Game mode

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPlayerCommunityMap(version, title, platform, gameMode, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPlayerCommunityMapExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new CommunityApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var gameMode = gameMode_example;  // String | Game mode

            try
            {
                // Get player community map (v1)
                ApiResponse result = apiInstance.fetchPlayerCommunityMap(version, title, platform, gameMode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CommunityApi.fetchPlayerCommunityMap: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiCommunityApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$gameMode = gameMode_example; // String | Game mode

try {
    $result = $api_instance->fetchPlayerCommunityMap($version, $title, $platform, $gameMode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommunityApi->fetchPlayerCommunityMap: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CommunityApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CommunityApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $gameMode = gameMode_example; # String | Game mode

eval { 
    my $result = $api_instance->fetchPlayerCommunityMap(version => $version, title => $title, platform => $platform, gameMode => $gameMode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommunityApi->fetchPlayerCommunityMap: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CommunityApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
gameMode = gameMode_example # String | Game mode

try: 
    # Get player community map (v1)
    api_response = api_instance.fetch_player_community_map(version, title, platform, gameMode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommunityApi->fetchPlayerCommunityMap: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
gameMode*
String
Game mode
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


Friends

fetchFriendsCompendium

Get friends compendium (v1)

Returns friends compendium data. Default version: v1


/papi-client/codfriends/{version}/{platform}/gamer/{username}/compendium

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/codfriends/{version}/{platform}/gamer/{username}/compendium?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchFriendsCompendium(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#fetchFriendsCompendium");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchFriendsCompendium(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#fetchFriendsCompendium");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Get friends compendium (v1)
[apiInstance fetchFriendsCompendiumWith:version
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchFriendsCompendium(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchFriendsCompendiumExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get friends compendium (v1)
                ApiResponse result = apiInstance.fetchFriendsCompendium(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.fetchFriendsCompendium: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->fetchFriendsCompendium($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->fetchFriendsCompendium: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->fetchFriendsCompendium(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->fetchFriendsCompendium: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get friends compendium (v1)
    api_response = api_instance.fetch_friends_compendium(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->fetchFriendsCompendium: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchRelationshipsList

Get relationships list (v1)

Returns relationships list data. Default version: v1


/papi-client/relationships/{version}/list

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/relationships/{version}/list?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchRelationshipsList(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#fetchRelationshipsList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchRelationshipsList(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#fetchRelationshipsList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Get relationships list (v1)
[apiInstance fetchRelationshipsListWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchRelationshipsList(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchRelationshipsListExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Get relationships list (v1)
                ApiResponse result = apiInstance.fetchRelationshipsList(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.fetchRelationshipsList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->fetchRelationshipsList($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->fetchRelationshipsList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->fetchRelationshipsList(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->fetchRelationshipsList: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Get relationships list (v1)
    api_response = api_instance.fetch_relationships_list(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->fetchRelationshipsList: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getFriends

Get friends list (v2)

Returns the user's friends list for a specific platform (DEPRECATED - returns 500 error). Default version: v2


/papi-client/crm/cod/{version}/friends/platform/{platform}/gamer/{username}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/friends/platform/{platform}/gamer/{username}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.getFriends(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#getFriends");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.getFriends(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#getFriends");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Get friends list (v2)
[apiInstance getFriendsWith:version
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFriends(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFriendsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get friends list (v2)
                ApiResponse result = apiInstance.getFriends(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.getFriends: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->getFriends($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->getFriends: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->getFriends(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->getFriends: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get friends list (v2)
    api_response = api_instance.get_friends(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->getFriends: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error - endpoint consistently fails


sendAddFavoriteFriend

Add favorite friend (v1)

Adds a friend to favorites. Default version: v1


/papi-client/relationships/{version}/friend/platform/{platform}/gamer/{username}/set/fav

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/relationships/{version}/friend/platform/{platform}/gamer/{username}/set/fav?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.sendAddFavoriteFriend(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendAddFavoriteFriend");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.sendAddFavoriteFriend(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendAddFavoriteFriend");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Add favorite friend (v1)
[apiInstance sendAddFavoriteFriendWith:version
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendAddFavoriteFriend(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendAddFavoriteFriendExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Add favorite friend (v1)
                ApiResponse result = apiInstance.sendAddFavoriteFriend(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendAddFavoriteFriend: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->sendAddFavoriteFriend($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendAddFavoriteFriend: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->sendAddFavoriteFriend(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendAddFavoriteFriend: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Add favorite friend (v1)
    api_response = api_instance.send_add_favorite_friend(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendAddFavoriteFriend: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendBlockFriend

Block friend (v1)

Block a user. Default version: v1


/papi-client/codfriends/{version}/block/uno/id/{unoId}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/codfriends/{version}/block/uno/id/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendBlockFriend(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendBlockFriend");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendBlockFriend(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendBlockFriend");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Block friend (v1)
[apiInstance sendBlockFriendWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendBlockFriend(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendBlockFriendExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Block friend (v1)
                ApiResponse result = apiInstance.sendBlockFriend(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendBlockFriend: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->sendBlockFriend($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendBlockFriend: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->sendBlockFriend(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendBlockFriend: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Block friend (v1)
    api_response = api_instance.send_block_friend(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendBlockFriend: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendCancelFriendRequest

Cancel friend request (v1)

Cancel a pending friend request. Default version: v1


/papi-client/codfriends/{version}/uninvite/uno/id/{unoId}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/codfriends/{version}/uninvite/uno/id/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendCancelFriendRequest(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendCancelFriendRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendCancelFriendRequest(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendCancelFriendRequest");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Cancel friend request (v1)
[apiInstance sendCancelFriendRequestWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendCancelFriendRequest(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendCancelFriendRequestExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Cancel friend request (v1)
                ApiResponse result = apiInstance.sendCancelFriendRequest(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendCancelFriendRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->sendCancelFriendRequest($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendCancelFriendRequest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->sendCancelFriendRequest(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendCancelFriendRequest: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Cancel friend request (v1)
    api_response = api_instance.send_cancel_friend_request(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendCancelFriendRequest: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendFriendRequest

Send friend request (v2)

Send a friend request to a user by UNO ID (DEPRECATED - authentication error). Default version: v2


/papi-client/crm/cod/{version}/friends/uno/{unoId}/send

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/friends/uno/{unoId}/send?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendFriendRequest(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendFriendRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendFriendRequest(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendFriendRequest");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Send friend request (v2)
[apiInstance sendFriendRequestWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendFriendRequest(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendFriendRequestExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Send friend request (v2)
                ApiResponse result = apiInstance.sendFriendRequest(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendFriendRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->sendFriendRequest($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendFriendRequest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->sendFriendRequest(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendFriendRequest: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Send friend request (v2)
    api_response = api_instance.send_friend_request(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendFriendRequest: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 403 - Not permitted - authentication required

Status: 500 - Internal server error


sendFriendRequestByPlatform

Send friend request by platform (v1)

Send a friend request to a user by platform and username. Default version: v1


/papi-client/codfriends/{version}/invite/{platform}/gamer/{username}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/codfriends/{version}/invite/{platform}/gamer/{username}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.sendFriendRequestByPlatform(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendFriendRequestByPlatform");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.sendFriendRequestByPlatform(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendFriendRequestByPlatform");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Send friend request by platform (v1)
[apiInstance sendFriendRequestByPlatformWith:version
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendFriendRequestByPlatform(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendFriendRequestByPlatformExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Send friend request by platform (v1)
                ApiResponse result = apiInstance.sendFriendRequestByPlatform(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendFriendRequestByPlatform: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->sendFriendRequestByPlatform($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendFriendRequestByPlatform: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->sendFriendRequestByPlatform(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendFriendRequestByPlatform: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Send friend request by platform (v1)
    api_response = api_instance.send_friend_request_by_platform(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendFriendRequestByPlatform: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendFriendRequestByUno

Send friend request by UNO ID (v1)

Send a friend request to a user by UNO ID. Default version: v1


/papi-client/codfriends/{version}/invite/uno/id/{unoId}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/codfriends/{version}/invite/uno/id/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendFriendRequestByUno(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendFriendRequestByUno");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendFriendRequestByUno(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendFriendRequestByUno");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Send friend request by UNO ID (v1)
[apiInstance sendFriendRequestByUnoWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendFriendRequestByUno(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendFriendRequestByUnoExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Send friend request by UNO ID (v1)
                ApiResponse result = apiInstance.sendFriendRequestByUno(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendFriendRequestByUno: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->sendFriendRequestByUno($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendFriendRequestByUno: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->sendFriendRequestByUno(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendFriendRequestByUno: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Send friend request by UNO ID (v1)
    api_response = api_instance.send_friend_request_by_uno(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendFriendRequestByUno: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendRejectFriendRequest

Reject friend request (v1)

Reject a pending friend request. Default version: v1


/papi-client/codfriends/{version}/reject/uno/id/{unoId}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/codfriends/{version}/reject/uno/id/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendRejectFriendRequest(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendRejectFriendRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendRejectFriendRequest(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendRejectFriendRequest");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Reject friend request (v1)
[apiInstance sendRejectFriendRequestWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendRejectFriendRequest(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendRejectFriendRequestExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Reject friend request (v1)
                ApiResponse result = apiInstance.sendRejectFriendRequest(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendRejectFriendRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->sendRejectFriendRequest($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendRejectFriendRequest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->sendRejectFriendRequest(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendRejectFriendRequest: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Reject friend request (v1)
    api_response = api_instance.send_reject_friend_request(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendRejectFriendRequest: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendRemoveFavoriteFriend

Remove favorite friend (v1)

Removes a friend from favorites. Default version: v1


/papi-client/relationships/{version}/friend/platform/{platform}/gamer/{username}/set/delete

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/relationships/{version}/friend/platform/{platform}/gamer/{username}/set/delete?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.sendRemoveFavoriteFriend(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendRemoveFavoriteFriend");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.sendRemoveFavoriteFriend(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendRemoveFavoriteFriend");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Remove favorite friend (v1)
[apiInstance sendRemoveFavoriteFriendWith:version
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendRemoveFavoriteFriend(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendRemoveFavoriteFriendExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Remove favorite friend (v1)
                ApiResponse result = apiInstance.sendRemoveFavoriteFriend(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendRemoveFavoriteFriend: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->sendRemoveFavoriteFriend($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendRemoveFavoriteFriend: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->sendRemoveFavoriteFriend(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendRemoveFavoriteFriend: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Remove favorite friend (v1)
    api_response = api_instance.send_remove_favorite_friend(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendRemoveFavoriteFriend: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendRemoveFriend

Remove friend (v1)

Remove a friend from friends list. Default version: v1


/papi-client/codfriends/{version}/remove/uno/id/{unoId}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/codfriends/{version}/remove/uno/id/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendRemoveFriend(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendRemoveFriend");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendRemoveFriend(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendRemoveFriend");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Remove friend (v1)
[apiInstance sendRemoveFriendWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendRemoveFriend(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendRemoveFriendExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Remove friend (v1)
                ApiResponse result = apiInstance.sendRemoveFriend(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendRemoveFriend: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->sendRemoveFriend($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendRemoveFriend: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->sendRemoveFriend(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendRemoveFriend: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Remove friend (v1)
    api_response = api_instance.send_remove_friend(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendRemoveFriend: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendUnblockFriend

Unblock friend (v1)

Unblock a user. Default version: v1


/papi-client/codfriends/{version}/unblock/uno/id/{unoId}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/codfriends/{version}/unblock/uno/id/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FriendsApi;

import java.io.File;
import java.util.*;

public class FriendsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendUnblockFriend(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendUnblockFriend");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FriendsApi;

public class FriendsApiExample {

    public static void main(String[] args) {
        FriendsApi apiInstance = new FriendsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.sendUnblockFriend(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FriendsApi#sendUnblockFriend");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

FriendsApi *apiInstance = [[FriendsApi alloc] init];

// Unblock friend (v1)
[apiInstance sendUnblockFriendWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.FriendsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendUnblockFriend(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendUnblockFriendExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new FriendsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Unblock friend (v1)
                ApiResponse result = apiInstance.sendUnblockFriend(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FriendsApi.sendUnblockFriend: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiFriendsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->sendUnblockFriend($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FriendsApi->sendUnblockFriend: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FriendsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FriendsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->sendUnblockFriend(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FriendsApi->sendUnblockFriend: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FriendsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Unblock friend (v1)
    api_response = api_instance.send_unblock_friend(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FriendsApi->sendUnblockFriend: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


GameStatus

getGameStatus

Get game server status

Returns server status information for all Activision games including Call of Duty


/apexrest/oshp/landingpage

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/apexrest/oshp/landingpage?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GameStatusApi;

import java.io.File;
import java.util.*;

public class GameStatusApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        GameStatusApi apiInstance = new GameStatusApi();
        try {
            GameStatusResponse result = apiInstance.getGameStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GameStatusApi#getGameStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GameStatusApi;

public class GameStatusApiExample {

    public static void main(String[] args) {
        GameStatusApi apiInstance = new GameStatusApi();
        try {
            GameStatusResponse result = apiInstance.getGameStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GameStatusApi#getGameStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];

GameStatusApi *apiInstance = [[GameStatusApi alloc] init];

// Get game server status
[apiInstance getGameStatusWithCompletionHandler: 
              ^(GameStatusResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.GameStatusApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getGameStatus(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getGameStatusExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new GameStatusApi();

            try
            {
                // Get game server status
                GameStatusResponse result = apiInstance.getGameStatus();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GameStatusApi.getGameStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiGameStatusApi();

try {
    $result = $api_instance->getGameStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GameStatusApi->getGameStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GameStatusApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::GameStatusApi->new();

eval { 
    my $result = $api_instance->getGameStatus();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GameStatusApi->getGameStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.GameStatusApi()

try: 
    # Get game server status
    api_response = api_instance.get_game_status()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GameStatusApi->getGameStatus: %s\n" % e)

Parameters

Query parameters
Name Description

Responses

Status: 200 - Successful response (works without authentication)

Status: 500 - Internal server error


Gifting

fetchChallengeToken

Get challenge token (v2)

Returns challenge token for gifting verification. Default version: v2


/papi-client/gifting/{version}/proof/{unoId}/{otp}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/gifting/{version}/proof/{unoId}/{otp}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GiftingApi;

import java.io.File;
import java.util.*;

public class GiftingApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        GiftingApi apiInstance = new GiftingApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        String otp = otp_example; // String | One-time password for gifting verification
        try {
            ApiResponse result = apiInstance.fetchChallengeToken(version, unoId, otp);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GiftingApi#fetchChallengeToken");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GiftingApi;

public class GiftingApiExample {

    public static void main(String[] args) {
        GiftingApi apiInstance = new GiftingApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        String otp = otp_example; // String | One-time password for gifting verification
        try {
            ApiResponse result = apiInstance.fetchChallengeToken(version, unoId, otp);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GiftingApi#fetchChallengeToken");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification
String *otp = otp_example; // One-time password for gifting verification

GiftingApi *apiInstance = [[GiftingApi alloc] init];

// Get challenge token (v2)
[apiInstance fetchChallengeTokenWith:version
    unoId:unoId
    otp:otp
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.GiftingApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification
var otp = otp_example; // {{String}} One-time password for gifting verification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchChallengeToken(version, unoId, otp, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchChallengeTokenExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new GiftingApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification
            var otp = otp_example;  // String | One-time password for gifting verification

            try
            {
                // Get challenge token (v2)
                ApiResponse result = apiInstance.fetchChallengeToken(version, unoId, otp);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GiftingApi.fetchChallengeToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiGiftingApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification
$otp = otp_example; // String | One-time password for gifting verification

try {
    $result = $api_instance->fetchChallengeToken($version, $unoId, $otp);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GiftingApi->fetchChallengeToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GiftingApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::GiftingApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification
my $otp = otp_example; # String | One-time password for gifting verification

eval { 
    my $result = $api_instance->fetchChallengeToken(version => $version, unoId => $unoId, otp => $otp);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GiftingApi->fetchChallengeToken: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.GiftingApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification
otp = otp_example # String | One-time password for gifting verification

try: 
    # Get challenge token (v2)
    api_response = api_instance.fetch_challenge_token(version, unoId, otp)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GiftingApi->fetchChallengeToken: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
otp*
String
One-time password for gifting verification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchGiftableFriends

Get giftable friends (v2)

Returns list of friends that can receive a specific gift. Default version: v2


/papi-client/gifting/{version}/title/{title}/platform/{platform}/uno/{unoId}/sku/{sku}/giftableFriends

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/gifting/{version}/title/{title}/platform/{platform}/uno/{unoId}/sku/{sku}/giftableFriends?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GiftingApi;

import java.io.File;
import java.util.*;

public class GiftingApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        GiftingApi apiInstance = new GiftingApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String unoId = unoId_example; // String | UNO ID for user identification
        String sku = sku_example; // String | Stock keeping unit for items
        try {
            ApiResponse result = apiInstance.fetchGiftableFriends(version, title, platform, unoId, sku);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GiftingApi#fetchGiftableFriends");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GiftingApi;

public class GiftingApiExample {

    public static void main(String[] args) {
        GiftingApi apiInstance = new GiftingApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String unoId = unoId_example; // String | UNO ID for user identification
        String sku = sku_example; // String | Stock keeping unit for items
        try {
            ApiResponse result = apiInstance.fetchGiftableFriends(version, title, platform, unoId, sku);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GiftingApi#fetchGiftableFriends");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *unoId = unoId_example; // UNO ID for user identification
String *sku = sku_example; // Stock keeping unit for items

GiftingApi *apiInstance = [[GiftingApi alloc] init];

// Get giftable friends (v2)
[apiInstance fetchGiftableFriendsWith:version
    title:title
    platform:platform
    unoId:unoId
    sku:sku
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.GiftingApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var unoId = unoId_example; // {{String}} UNO ID for user identification
var sku = sku_example; // {{String}} Stock keeping unit for items

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchGiftableFriends(version, title, platform, unoId, sku, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchGiftableFriendsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new GiftingApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var unoId = unoId_example;  // String | UNO ID for user identification
            var sku = sku_example;  // String | Stock keeping unit for items

            try
            {
                // Get giftable friends (v2)
                ApiResponse result = apiInstance.fetchGiftableFriends(version, title, platform, unoId, sku);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GiftingApi.fetchGiftableFriends: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiGiftingApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$unoId = unoId_example; // String | UNO ID for user identification
$sku = sku_example; // String | Stock keeping unit for items

try {
    $result = $api_instance->fetchGiftableFriends($version, $title, $platform, $unoId, $sku);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GiftingApi->fetchGiftableFriends: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GiftingApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::GiftingApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $unoId = unoId_example; # String | UNO ID for user identification
my $sku = sku_example; # String | Stock keeping unit for items

eval { 
    my $result = $api_instance->fetchGiftableFriends(version => $version, title => $title, platform => $platform, unoId => $unoId, sku => $sku);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GiftingApi->fetchGiftableFriends: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.GiftingApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
unoId = unoId_example # String | UNO ID for user identification
sku = sku_example # String | Stock keeping unit for items

try: 
    # Get giftable friends (v2)
    api_response = api_instance.fetch_giftable_friends(version, title, platform, unoId, sku)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GiftingApi->fetchGiftableFriends: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
unoId*
String
UNO ID for user identification
Required
sku*
String
Stock keeping unit for items
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendFriendGift

Send friend gift (v2)

Send a gift to a friend. Default version: v2


/papi-client/gifting/{version}/title/{title}/platform/{platform}/gamer/{username}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/gifting/{version}/title/{title}/platform/{platform}/gamer/{username}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GiftingApi;

import java.io.File;
import java.util.*;

public class GiftingApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        GiftingApi apiInstance = new GiftingApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.sendFriendGift(version, title, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GiftingApi#sendFriendGift");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GiftingApi;

public class GiftingApiExample {

    public static void main(String[] args) {
        GiftingApi apiInstance = new GiftingApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.sendFriendGift(version, title, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GiftingApi#sendFriendGift");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

GiftingApi *apiInstance = [[GiftingApi alloc] init];

// Send friend gift (v2)
[apiInstance sendFriendGiftWith:version
    title:title
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.GiftingApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendFriendGift(version, title, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendFriendGiftExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new GiftingApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Send friend gift (v2)
                ApiResponse result = apiInstance.sendFriendGift(version, title, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GiftingApi.sendFriendGift: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiGiftingApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->sendFriendGift($version, $title, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GiftingApi->sendFriendGift: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GiftingApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::GiftingApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->sendFriendGift(version => $version, title => $title, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GiftingApi->sendFriendGift: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.GiftingApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Send friend gift (v2)
    api_response = api_instance.send_friend_gift(version, title, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GiftingApi->sendFriendGift: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


Inventory

fetchCODPointsByPlatform

Get COD Points by platform

Returns player's COD Points balance (alternative endpoint). Default version: {version}


/papi-client/inventory/{version}/title/{title}/platform/{platform}/gamer/{username}/currency

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/inventory/{version}/title/{title}/platform/{platform}/gamer/{username}/currency?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryApi;

import java.io.File;
import java.util.*;

public class InventoryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        InventoryApi apiInstance = new InventoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchCODPointsByPlatform(version, title, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#fetchCODPointsByPlatform");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryApi;

public class InventoryApiExample {

    public static void main(String[] args) {
        InventoryApi apiInstance = new InventoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchCODPointsByPlatform(version, title, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#fetchCODPointsByPlatform");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

InventoryApi *apiInstance = [[InventoryApi alloc] init];

// Get COD Points by platform
[apiInstance fetchCODPointsByPlatformWith:version
    title:title
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.InventoryApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchCODPointsByPlatform(version, title, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchCODPointsByPlatformExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new InventoryApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get COD Points by platform
                ApiResponse result = apiInstance.fetchCODPointsByPlatform(version, title, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryApi.fetchCODPointsByPlatform: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiInventoryApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->fetchCODPointsByPlatform($version, $title, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->fetchCODPointsByPlatform: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InventoryApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->fetchCODPointsByPlatform(version => $version, title => $title, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryApi->fetchCODPointsByPlatform: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InventoryApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get COD Points by platform
    api_response = api_instance.fetch_cod_points_by_platform(version, title, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryApi->fetchCODPointsByPlatform: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchPurchasableItemBySku

Get purchasable item by SKU (v1)

Returns details for a specific purchasable item. Default version: v1


/papi-client/inventory/{version}/title/{title}/bundle/{sku}/{locale}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/inventory/{version}/title/{title}/bundle/{sku}/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryApi;

import java.io.File;
import java.util.*;

public class InventoryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        InventoryApi apiInstance = new InventoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String sku = sku_example; // String | Stock keeping unit for items
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPurchasableItemBySku(version, title, sku, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#fetchPurchasableItemBySku");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryApi;

public class InventoryApiExample {

    public static void main(String[] args) {
        InventoryApi apiInstance = new InventoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String sku = sku_example; // String | Stock keeping unit for items
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPurchasableItemBySku(version, title, sku, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#fetchPurchasableItemBySku");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *sku = sku_example; // Stock keeping unit for items
String *locale = locale_example; // Locale for response

InventoryApi *apiInstance = [[InventoryApi alloc] init];

// Get purchasable item by SKU (v1)
[apiInstance fetchPurchasableItemBySkuWith:version
    title:title
    sku:sku
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.InventoryApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var sku = sku_example; // {{String}} Stock keeping unit for items
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPurchasableItemBySku(version, title, sku, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPurchasableItemBySkuExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new InventoryApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var sku = sku_example;  // String | Stock keeping unit for items
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get purchasable item by SKU (v1)
                ApiResponse result = apiInstance.fetchPurchasableItemBySku(version, title, sku, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryApi.fetchPurchasableItemBySku: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiInventoryApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$sku = sku_example; // String | Stock keeping unit for items
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchPurchasableItemBySku($version, $title, $sku, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->fetchPurchasableItemBySku: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InventoryApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $sku = sku_example; # String | Stock keeping unit for items
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchPurchasableItemBySku(version => $version, title => $title, sku => $sku, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryApi->fetchPurchasableItemBySku: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InventoryApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
sku = sku_example # String | Stock keeping unit for items
locale = locale_example # String | Locale for response

try: 
    # Get purchasable item by SKU (v1)
    api_response = api_instance.fetch_purchasable_item_by_sku(version, title, sku, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryApi->fetchPurchasableItemBySku: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
sku*
String
Stock keeping unit for items
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchPurchasableItems

Get purchasable items for player (v1)

Returns purchasable items for a specific player. Default version: v1


/papi-client/inventory/{version}/title/{title}/platform/{platform}/purchasable/gamer/{username}/{locale}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/inventory/{version}/title/{title}/platform/{platform}/purchasable/gamer/{username}/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryApi;

import java.io.File;
import java.util.*;

public class InventoryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        InventoryApi apiInstance = new InventoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPurchasableItems(version, title, platform, username, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#fetchPurchasableItems");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryApi;

public class InventoryApiExample {

    public static void main(String[] args) {
        InventoryApi apiInstance = new InventoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPurchasableItems(version, title, platform, username, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#fetchPurchasableItems");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *locale = locale_example; // Locale for response

InventoryApi *apiInstance = [[InventoryApi alloc] init];

// Get purchasable items for player (v1)
[apiInstance fetchPurchasableItemsWith:version
    title:title
    platform:platform
    username:username
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.InventoryApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPurchasableItems(version, title, platform, username, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPurchasableItemsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new InventoryApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get purchasable items for player (v1)
                ApiResponse result = apiInstance.fetchPurchasableItems(version, title, platform, username, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryApi.fetchPurchasableItems: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiInventoryApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchPurchasableItems($version, $title, $platform, $username, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->fetchPurchasableItems: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InventoryApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchPurchasableItems(version => $version, title => $title, platform => $platform, username => $username, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryApi->fetchPurchasableItems: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InventoryApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
locale = locale_example # String | Locale for response

try: 
    # Get purchasable items for player (v1)
    api_response = api_instance.fetch_purchasable_items(version, title, platform, username, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryApi->fetchPurchasableItems: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getCODPoints

Get player COD Points

Returns player COD Points balance (DEPRECATED - returns 500 error)


/papi-client/codpoints/title/{title}/platform/{platform}/gamer/{username}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json"\
"https://callofduty.com/api/papi-client/codpoints/title/{title}/platform/{platform}/gamer/{username}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryApi;

import java.io.File;
import java.util.*;

public class InventoryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        InventoryApi apiInstance = new InventoryApi();
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            SuccessResponse result = apiInstance.getCODPoints(title, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#getCODPoints");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryApi;

public class InventoryApiExample {

    public static void main(String[] args) {
        InventoryApi apiInstance = new InventoryApi();
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            SuccessResponse result = apiInstance.getCODPoints(title, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#getCODPoints");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

InventoryApi *apiInstance = [[InventoryApi alloc] init];

// Get player COD Points
[apiInstance getCODPointsWith:title
    platform:platform
    username:username
              completionHandler: ^(SuccessResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.InventoryApi()
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCODPoints(title, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCODPointsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new InventoryApi();
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get player COD Points
                SuccessResponse result = apiInstance.getCODPoints(title, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryApi.getCODPoints: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiInventoryApi();
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->getCODPoints($title, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->getCODPoints: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InventoryApi->new();
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->getCODPoints(title => $title, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryApi->getCODPoints: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InventoryApi()
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get player COD Points
    api_response = api_instance.get_cod_points(title, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryApi->getCODPoints: %s\n" % e)

Parameters

Path parameters
Name Description
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 404 - Resource not found

Status: 500 - Internal server error - endpoint consistently fails


sendInventoryPurchase

Purchase item with COD Points (v1)

Purchase an item using COD Points. Default version: v1


/papi-client/inventory/{version}/title/{title}/platform/{platform}/gamer/{username}/item/{item}/purchaseWith/CODPoints

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/inventory/{version}/title/{title}/platform/{platform}/gamer/{username}/item/{item}/purchaseWith/CODPoints?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryApi;

import java.io.File;
import java.util.*;

public class InventoryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        InventoryApi apiInstance = new InventoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String item = item_example; // String | Item identifier
        try {
            ApiResponse result = apiInstance.sendInventoryPurchase(version, title, platform, username, item);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#sendInventoryPurchase");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryApi;

public class InventoryApiExample {

    public static void main(String[] args) {
        InventoryApi apiInstance = new InventoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String item = item_example; // String | Item identifier
        try {
            ApiResponse result = apiInstance.sendInventoryPurchase(version, title, platform, username, item);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#sendInventoryPurchase");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *item = item_example; // Item identifier

InventoryApi *apiInstance = [[InventoryApi alloc] init];

// Purchase item with COD Points (v1)
[apiInstance sendInventoryPurchaseWith:version
    title:title
    platform:platform
    username:username
    item:item
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.InventoryApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var item = item_example; // {{String}} Item identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendInventoryPurchase(version, title, platform, username, item, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendInventoryPurchaseExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new InventoryApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var item = item_example;  // String | Item identifier

            try
            {
                // Purchase item with COD Points (v1)
                ApiResponse result = apiInstance.sendInventoryPurchase(version, title, platform, username, item);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryApi.sendInventoryPurchase: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiInventoryApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$item = item_example; // String | Item identifier

try {
    $result = $api_instance->sendInventoryPurchase($version, $title, $platform, $username, $item);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->sendInventoryPurchase: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InventoryApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $item = item_example; # String | Item identifier

eval { 
    my $result = $api_instance->sendInventoryPurchase(version => $version, title => $title, platform => $platform, username => $username, item => $item);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryApi->sendInventoryPurchase: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InventoryApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
item = item_example # String | Item identifier

try: 
    # Purchase item with COD Points (v1)
    api_response = api_instance.send_inventory_purchase(version, title, platform, username, item)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryApi->sendInventoryPurchase: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
item*
String
Item identifier
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


Leaderboards

fetchFriendsLeaderboard

Get friends leaderboard (v2)

Returns leaderboard data for user's friends. Default version: v2


/papi-client/leaderboards/{version}/title/{title}/platform/{platform}/time/{timeframe}/type/{type}/mode/{mode}/gamer/{username}/friends

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/leaderboards/{version}/title/{title}/platform/{platform}/time/{timeframe}/type/{type}/mode/{mode}/gamer/{username}/friends?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LeaderboardsApi;

import java.io.File;
import java.util.*;

public class LeaderboardsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LeaderboardsApi apiInstance = new LeaderboardsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String timeframe = timeframe_example; // String | Time period for stats
        String type = type_example; // String | Stats type
        String mode = mode_example; // String | Game mode
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchFriendsLeaderboard(version, title, platform, timeframe, type, mode, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LeaderboardsApi#fetchFriendsLeaderboard");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LeaderboardsApi;

public class LeaderboardsApiExample {

    public static void main(String[] args) {
        LeaderboardsApi apiInstance = new LeaderboardsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String timeframe = timeframe_example; // String | Time period for stats
        String type = type_example; // String | Stats type
        String mode = mode_example; // String | Game mode
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchFriendsLeaderboard(version, title, platform, timeframe, type, mode, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LeaderboardsApi#fetchFriendsLeaderboard");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *timeframe = timeframe_example; // Time period for stats
String *type = type_example; // Stats type
String *mode = mode_example; // Game mode
String *username = username_example; // Player username (URL encoded)

LeaderboardsApi *apiInstance = [[LeaderboardsApi alloc] init];

// Get friends leaderboard (v2)
[apiInstance fetchFriendsLeaderboardWith:version
    title:title
    platform:platform
    timeframe:timeframe
    type:type
    mode:mode
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LeaderboardsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var timeframe = timeframe_example; // {{String}} Time period for stats
var type = type_example; // {{String}} Stats type
var mode = mode_example; // {{String}} Game mode
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchFriendsLeaderboard(version, title, platform, timeframe, type, mode, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchFriendsLeaderboardExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LeaderboardsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var timeframe = timeframe_example;  // String | Time period for stats
            var type = type_example;  // String | Stats type
            var mode = mode_example;  // String | Game mode
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get friends leaderboard (v2)
                ApiResponse result = apiInstance.fetchFriendsLeaderboard(version, title, platform, timeframe, type, mode, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LeaderboardsApi.fetchFriendsLeaderboard: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLeaderboardsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$timeframe = timeframe_example; // String | Time period for stats
$type = type_example; // String | Stats type
$mode = mode_example; // String | Game mode
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->fetchFriendsLeaderboard($version, $title, $platform, $timeframe, $type, $mode, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LeaderboardsApi->fetchFriendsLeaderboard: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LeaderboardsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LeaderboardsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $timeframe = timeframe_example; # String | Time period for stats
my $type = type_example; # String | Stats type
my $mode = mode_example; # String | Game mode
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->fetchFriendsLeaderboard(version => $version, title => $title, platform => $platform, timeframe => $timeframe, type => $type, mode => $mode, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LeaderboardsApi->fetchFriendsLeaderboard: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LeaderboardsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
timeframe = timeframe_example # String | Time period for stats
type = type_example # String | Stats type
mode = mode_example # String | Game mode
username = username_example # String | Player username (URL encoded)

try: 
    # Get friends leaderboard (v2)
    api_response = api_instance.fetch_friends_leaderboard(version, title, platform, timeframe, type, mode, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LeaderboardsApi->fetchFriendsLeaderboard: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
timeframe*
String
Time period for stats
Required
type*
String
Stats type
Required
mode*
String
Game mode
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchPageLeaderboard

Get page leaderboard (v2)

Returns paginated leaderboard data. Default version: v2


/papi-client/leaderboards/{version}/title/{title}/platform/{platform}/time/{timeframe}/type/{type}/mode/{mode}/page/{page}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/leaderboards/{version}/title/{title}/platform/{platform}/time/{timeframe}/type/{type}/mode/{mode}/page/{page}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LeaderboardsApi;

import java.io.File;
import java.util.*;

public class LeaderboardsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LeaderboardsApi apiInstance = new LeaderboardsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String timeframe = timeframe_example; // String | Time period for stats
        String type = type_example; // String | Stats type
        String mode = mode_example; // String | Game mode
        Integer page = 56; // Integer | Page number for pagination
        try {
            ApiResponse result = apiInstance.fetchPageLeaderboard(version, title, platform, timeframe, type, mode, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LeaderboardsApi#fetchPageLeaderboard");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LeaderboardsApi;

public class LeaderboardsApiExample {

    public static void main(String[] args) {
        LeaderboardsApi apiInstance = new LeaderboardsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String timeframe = timeframe_example; // String | Time period for stats
        String type = type_example; // String | Stats type
        String mode = mode_example; // String | Game mode
        Integer page = 56; // Integer | Page number for pagination
        try {
            ApiResponse result = apiInstance.fetchPageLeaderboard(version, title, platform, timeframe, type, mode, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LeaderboardsApi#fetchPageLeaderboard");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *timeframe = timeframe_example; // Time period for stats
String *type = type_example; // Stats type
String *mode = mode_example; // Game mode
Integer *page = 56; // Page number for pagination

LeaderboardsApi *apiInstance = [[LeaderboardsApi alloc] init];

// Get page leaderboard (v2)
[apiInstance fetchPageLeaderboardWith:version
    title:title
    platform:platform
    timeframe:timeframe
    type:type
    mode:mode
    page:page
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LeaderboardsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var timeframe = timeframe_example; // {{String}} Time period for stats
var type = type_example; // {{String}} Stats type
var mode = mode_example; // {{String}} Game mode
var page = 56; // {{Integer}} Page number for pagination

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPageLeaderboard(version, title, platform, timeframe, type, mode, page, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPageLeaderboardExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LeaderboardsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var timeframe = timeframe_example;  // String | Time period for stats
            var type = type_example;  // String | Stats type
            var mode = mode_example;  // String | Game mode
            var page = 56;  // Integer | Page number for pagination

            try
            {
                // Get page leaderboard (v2)
                ApiResponse result = apiInstance.fetchPageLeaderboard(version, title, platform, timeframe, type, mode, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LeaderboardsApi.fetchPageLeaderboard: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLeaderboardsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$timeframe = timeframe_example; // String | Time period for stats
$type = type_example; // String | Stats type
$mode = mode_example; // String | Game mode
$page = 56; // Integer | Page number for pagination

try {
    $result = $api_instance->fetchPageLeaderboard($version, $title, $platform, $timeframe, $type, $mode, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LeaderboardsApi->fetchPageLeaderboard: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LeaderboardsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LeaderboardsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $timeframe = timeframe_example; # String | Time period for stats
my $type = type_example; # String | Stats type
my $mode = mode_example; # String | Game mode
my $page = 56; # Integer | Page number for pagination

eval { 
    my $result = $api_instance->fetchPageLeaderboard(version => $version, title => $title, platform => $platform, timeframe => $timeframe, type => $type, mode => $mode, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LeaderboardsApi->fetchPageLeaderboard: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LeaderboardsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
timeframe = timeframe_example # String | Time period for stats
type = type_example # String | Stats type
mode = mode_example # String | Game mode
page = 56 # Integer | Page number for pagination

try: 
    # Get page leaderboard (v2)
    api_response = api_instance.fetch_page_leaderboard(version, title, platform, timeframe, type, mode, page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LeaderboardsApi->fetchPageLeaderboard: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
timeframe*
String
Time period for stats
Required
type*
String
Stats type
Required
mode*
String
Game mode
Required
page*
Integer
Page number for pagination
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchUserLeaderboard

Get user leaderboard (v2)

Returns leaderboard data for a specific user. Default version: v2


/papi-client/leaderboards/{version}/title/{title}/platform/{platform}/time/{timeframe}/type/{type}/mode/{mode}/gamer/{username}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/leaderboards/{version}/title/{title}/platform/{platform}/time/{timeframe}/type/{type}/mode/{mode}/gamer/{username}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LeaderboardsApi;

import java.io.File;
import java.util.*;

public class LeaderboardsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LeaderboardsApi apiInstance = new LeaderboardsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String timeframe = timeframe_example; // String | Time period for stats
        String type = type_example; // String | Stats type
        String mode = mode_example; // String | Game mode
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchUserLeaderboard(version, title, platform, timeframe, type, mode, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LeaderboardsApi#fetchUserLeaderboard");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LeaderboardsApi;

public class LeaderboardsApiExample {

    public static void main(String[] args) {
        LeaderboardsApi apiInstance = new LeaderboardsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String timeframe = timeframe_example; // String | Time period for stats
        String type = type_example; // String | Stats type
        String mode = mode_example; // String | Game mode
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchUserLeaderboard(version, title, platform, timeframe, type, mode, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LeaderboardsApi#fetchUserLeaderboard");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *timeframe = timeframe_example; // Time period for stats
String *type = type_example; // Stats type
String *mode = mode_example; // Game mode
String *username = username_example; // Player username (URL encoded)

LeaderboardsApi *apiInstance = [[LeaderboardsApi alloc] init];

// Get user leaderboard (v2)
[apiInstance fetchUserLeaderboardWith:version
    title:title
    platform:platform
    timeframe:timeframe
    type:type
    mode:mode
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LeaderboardsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var timeframe = timeframe_example; // {{String}} Time period for stats
var type = type_example; // {{String}} Stats type
var mode = mode_example; // {{String}} Game mode
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchUserLeaderboard(version, title, platform, timeframe, type, mode, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchUserLeaderboardExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LeaderboardsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var timeframe = timeframe_example;  // String | Time period for stats
            var type = type_example;  // String | Stats type
            var mode = mode_example;  // String | Game mode
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get user leaderboard (v2)
                ApiResponse result = apiInstance.fetchUserLeaderboard(version, title, platform, timeframe, type, mode, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LeaderboardsApi.fetchUserLeaderboard: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLeaderboardsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$timeframe = timeframe_example; // String | Time period for stats
$type = type_example; // String | Stats type
$mode = mode_example; // String | Game mode
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->fetchUserLeaderboard($version, $title, $platform, $timeframe, $type, $mode, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LeaderboardsApi->fetchUserLeaderboard: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LeaderboardsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LeaderboardsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $timeframe = timeframe_example; # String | Time period for stats
my $type = type_example; # String | Stats type
my $mode = mode_example; # String | Game mode
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->fetchUserLeaderboard(version => $version, title => $title, platform => $platform, timeframe => $timeframe, type => $type, mode => $mode, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LeaderboardsApi->fetchUserLeaderboard: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LeaderboardsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
timeframe = timeframe_example # String | Time period for stats
type = type_example # String | Stats type
mode = mode_example # String | Game mode
username = username_example # String | Player username (URL encoded)

try: 
    # Get user leaderboard (v2)
    api_response = api_instance.fetch_user_leaderboard(version, title, platform, timeframe, type, mode, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LeaderboardsApi->fetchUserLeaderboard: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
timeframe*
String
Time period for stats
Required
type*
String
Stats type
Required
mode*
String
Game mode
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getLeaderboards

Get leaderboards (v2)

Returns leaderboard data for a specific game and mode (DEPRECATED - API error). Default version: v2


/papi-client/leaderboards/{version}/title/{title}/platform/{platform}/time/{timeframe}/type/{type}/mode/{mode}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json"\
"https://callofduty.com/api/papi-client/leaderboards/{version}/title/{title}/platform/{platform}/time/{timeframe}/type/{type}/mode/{mode}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LeaderboardsApi;

import java.io.File;
import java.util.*;

public class LeaderboardsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LeaderboardsApi apiInstance = new LeaderboardsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String timeframe = timeframe_example; // String | Time period for stats
        String type = type_example; // String | Stats type
        String mode = mode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.getLeaderboards(version, title, platform, timeframe, type, mode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LeaderboardsApi#getLeaderboards");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LeaderboardsApi;

public class LeaderboardsApiExample {

    public static void main(String[] args) {
        LeaderboardsApi apiInstance = new LeaderboardsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String timeframe = timeframe_example; // String | Time period for stats
        String type = type_example; // String | Stats type
        String mode = mode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.getLeaderboards(version, title, platform, timeframe, type, mode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LeaderboardsApi#getLeaderboards");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *timeframe = timeframe_example; // Time period for stats
String *type = type_example; // Stats type
String *mode = mode_example; // Game mode

LeaderboardsApi *apiInstance = [[LeaderboardsApi alloc] init];

// Get leaderboards (v2)
[apiInstance getLeaderboardsWith:version
    title:title
    platform:platform
    timeframe:timeframe
    type:type
    mode:mode
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LeaderboardsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var timeframe = timeframe_example; // {{String}} Time period for stats
var type = type_example; // {{String}} Stats type
var mode = mode_example; // {{String}} Game mode

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLeaderboards(version, title, platform, timeframe, type, mode, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLeaderboardsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LeaderboardsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var timeframe = timeframe_example;  // String | Time period for stats
            var type = type_example;  // String | Stats type
            var mode = mode_example;  // String | Game mode

            try
            {
                // Get leaderboards (v2)
                ApiResponse result = apiInstance.getLeaderboards(version, title, platform, timeframe, type, mode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LeaderboardsApi.getLeaderboards: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLeaderboardsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$timeframe = timeframe_example; // String | Time period for stats
$type = type_example; // String | Stats type
$mode = mode_example; // String | Game mode

try {
    $result = $api_instance->getLeaderboards($version, $title, $platform, $timeframe, $type, $mode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LeaderboardsApi->getLeaderboards: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LeaderboardsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LeaderboardsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $timeframe = timeframe_example; # String | Time period for stats
my $type = type_example; # String | Stats type
my $mode = mode_example; # String | Game mode

eval { 
    my $result = $api_instance->getLeaderboards(version => $version, title => $title, platform => $platform, timeframe => $timeframe, type => $type, mode => $mode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LeaderboardsApi->getLeaderboards: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LeaderboardsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
timeframe = timeframe_example # String | Time period for stats
type = type_example # String | Stats type
mode = mode_example # String | Game mode

try: 
    # Get leaderboards (v2)
    api_response = api_instance.get_leaderboards(version, title, platform, timeframe, type, mode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LeaderboardsApi->getLeaderboards: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
timeframe*
String
Time period for stats
Required
type*
String
Stats type
Required
mode*
String
Game mode
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 400 - Bad request - invalid title or parameters

Status: 401 - Authentication required

Status: 500 - Internal server error - endpoint consistently fails


Loadouts

fetchLoadoutItems

Get loadout items (v3)

Returns loadout items for multiplayer (DEPRECATED - returns 500 error). Default version: v3


/papi-client/loadouts/{version}/title/{title}/items/mode/mp/{locale}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/loadouts/{version}/title/{title}/items/mode/mp/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoadoutsApi;

import java.io.File;
import java.util.*;

public class LoadoutsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LoadoutsApi apiInstance = new LoadoutsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchLoadoutItems(version, title, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoadoutsApi#fetchLoadoutItems");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoadoutsApi;

public class LoadoutsApiExample {

    public static void main(String[] args) {
        LoadoutsApi apiInstance = new LoadoutsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchLoadoutItems(version, title, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoadoutsApi#fetchLoadoutItems");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *locale = locale_example; // Locale for response

LoadoutsApi *apiInstance = [[LoadoutsApi alloc] init];

// Get loadout items (v3)
[apiInstance fetchLoadoutItemsWith:version
    title:title
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LoadoutsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchLoadoutItems(version, title, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchLoadoutItemsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LoadoutsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get loadout items (v3)
                ApiResponse result = apiInstance.fetchLoadoutItems(version, title, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoadoutsApi.fetchLoadoutItems: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLoadoutsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchLoadoutItems($version, $title, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LoadoutsApi->fetchLoadoutItems: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LoadoutsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LoadoutsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchLoadoutItems(version => $version, title => $title, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoadoutsApi->fetchLoadoutItems: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LoadoutsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
locale = locale_example # String | Locale for response

try: 
    # Get loadout items (v3)
    api_response = api_instance.fetch_loadout_items(version, title, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoadoutsApi->fetchLoadoutItems: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchLoadouts

Get loadouts (alternative) (v3)

Returns player loadouts (alternative endpoint). Default version: v3


/papi-client/loadouts/{version}/title/{title}/platform/{platform}/gamer/{username}/mode/mp

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/loadouts/{version}/title/{title}/platform/{platform}/gamer/{username}/mode/mp?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoadoutsApi;

import java.io.File;
import java.util.*;

public class LoadoutsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LoadoutsApi apiInstance = new LoadoutsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchLoadouts(version, title, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoadoutsApi#fetchLoadouts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoadoutsApi;

public class LoadoutsApiExample {

    public static void main(String[] args) {
        LoadoutsApi apiInstance = new LoadoutsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchLoadouts(version, title, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoadoutsApi#fetchLoadouts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

LoadoutsApi *apiInstance = [[LoadoutsApi alloc] init];

// Get loadouts (alternative) (v3)
[apiInstance fetchLoadoutsWith:version
    title:title
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LoadoutsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchLoadouts(version, title, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchLoadoutsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LoadoutsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get loadouts (alternative) (v3)
                ApiResponse result = apiInstance.fetchLoadouts(version, title, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoadoutsApi.fetchLoadouts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLoadoutsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->fetchLoadouts($version, $title, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LoadoutsApi->fetchLoadouts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LoadoutsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LoadoutsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->fetchLoadouts(version => $version, title => $title, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoadoutsApi->fetchLoadouts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LoadoutsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get loadouts (alternative) (v3)
    api_response = api_instance.fetch_loadouts(version, title, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoadoutsApi->fetchLoadouts: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getPlayerLoadouts

Get player loadouts (v3)

Returns player loadouts for a specific game and mode (DEPRECATED - returns 500 error). Default version: v3


/papi-client/loadouts/{version}/title/{title}/platform/{platform}/gamer/{username}/mode/{mode}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json"\
"https://callofduty.com/api/papi-client/loadouts/{version}/title/{title}/platform/{platform}/gamer/{username}/mode/{mode}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoadoutsApi;

import java.io.File;
import java.util.*;

public class LoadoutsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LoadoutsApi apiInstance = new LoadoutsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String mode = mode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.getPlayerLoadouts(version, title, platform, username, mode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoadoutsApi#getPlayerLoadouts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoadoutsApi;

public class LoadoutsApiExample {

    public static void main(String[] args) {
        LoadoutsApi apiInstance = new LoadoutsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String mode = mode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.getPlayerLoadouts(version, title, platform, username, mode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoadoutsApi#getPlayerLoadouts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *mode = mode_example; // Game mode

LoadoutsApi *apiInstance = [[LoadoutsApi alloc] init];

// Get player loadouts (v3)
[apiInstance getPlayerLoadoutsWith:version
    title:title
    platform:platform
    username:username
    mode:mode
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LoadoutsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var mode = mode_example; // {{String}} Game mode

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPlayerLoadouts(version, title, platform, username, mode, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPlayerLoadoutsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LoadoutsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var mode = mode_example;  // String | Game mode

            try
            {
                // Get player loadouts (v3)
                ApiResponse result = apiInstance.getPlayerLoadouts(version, title, platform, username, mode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoadoutsApi.getPlayerLoadouts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLoadoutsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$mode = mode_example; // String | Game mode

try {
    $result = $api_instance->getPlayerLoadouts($version, $title, $platform, $username, $mode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LoadoutsApi->getPlayerLoadouts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LoadoutsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LoadoutsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $mode = mode_example; # String | Game mode

eval { 
    my $result = $api_instance->getPlayerLoadouts(version => $version, title => $title, platform => $platform, username => $username, mode => $mode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoadoutsApi->getPlayerLoadouts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LoadoutsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
mode = mode_example # String | Game mode

try: 
    # Get player loadouts (v3)
    api_response = api_instance.get_player_loadouts(version, title, platform, username, mode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoadoutsApi->getPlayerLoadouts: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
mode*
String
Game mode
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 404 - Resource not found

Status: 500 - Internal server error - endpoint consistently fails


sendLoadouts

Save loadout (v3)

Save a loadout configuration to a specific slot. Default version: v3


/papi-client/loadouts/{version}/title/{title}/platform/{platform}/gamer/{username}/mode/mp/slot/{slot}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/loadouts/{version}/title/{title}/platform/{platform}/gamer/{username}/mode/mp/slot/{slot}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoadoutsApi;

import java.io.File;
import java.util.*;

public class LoadoutsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LoadoutsApi apiInstance = new LoadoutsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String slot = slot_example; // String | Loadout slot identifier
        try {
            ApiResponse result = apiInstance.sendLoadouts(version, title, platform, username, slot);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoadoutsApi#sendLoadouts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoadoutsApi;

public class LoadoutsApiExample {

    public static void main(String[] args) {
        LoadoutsApi apiInstance = new LoadoutsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String slot = slot_example; // String | Loadout slot identifier
        try {
            ApiResponse result = apiInstance.sendLoadouts(version, title, platform, username, slot);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoadoutsApi#sendLoadouts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *slot = slot_example; // Loadout slot identifier

LoadoutsApi *apiInstance = [[LoadoutsApi alloc] init];

// Save loadout (v3)
[apiInstance sendLoadoutsWith:version
    title:title
    platform:platform
    username:username
    slot:slot
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LoadoutsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var slot = slot_example; // {{String}} Loadout slot identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendLoadouts(version, title, platform, username, slot, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendLoadoutsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LoadoutsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var slot = slot_example;  // String | Loadout slot identifier

            try
            {
                // Save loadout (v3)
                ApiResponse result = apiInstance.sendLoadouts(version, title, platform, username, slot);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoadoutsApi.sendLoadouts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLoadoutsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$slot = slot_example; // String | Loadout slot identifier

try {
    $result = $api_instance->sendLoadouts($version, $title, $platform, $username, $slot);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LoadoutsApi->sendLoadouts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LoadoutsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LoadoutsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $slot = slot_example; # String | Loadout slot identifier

eval { 
    my $result = $api_instance->sendLoadouts(version => $version, title => $title, platform => $platform, username => $username, slot => $slot);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoadoutsApi->sendLoadouts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LoadoutsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
slot = slot_example # String | Loadout slot identifier

try: 
    # Save loadout (v3)
    api_response = api_instance.send_loadouts(version, title, platform, username, slot)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoadoutsApi->sendLoadouts: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
slot*
String
Loadout slot identifier
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


Loot

fetchPlayerLootstreams

Get player loot streams

Returns player's personal loot streams and status


/papi-client/loot/title/{title}/platform/{platform}/gamer/{username}/status/{locale}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/loot/title/{title}/platform/{platform}/gamer/{username}/status/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LootApi;

import java.io.File;
import java.util.*;

public class LootApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LootApi apiInstance = new LootApi();
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPlayerLootstreams(title, platform, username, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LootApi#fetchPlayerLootstreams");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LootApi;

public class LootApiExample {

    public static void main(String[] args) {
        LootApi apiInstance = new LootApi();
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPlayerLootstreams(title, platform, username, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LootApi#fetchPlayerLootstreams");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *locale = locale_example; // Locale for response

LootApi *apiInstance = [[LootApi alloc] init];

// Get player loot streams
[apiInstance fetchPlayerLootstreamsWith:title
    platform:platform
    username:username
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LootApi()
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPlayerLootstreams(title, platform, username, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPlayerLootstreamsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LootApi();
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get player loot streams
                ApiResponse result = apiInstance.fetchPlayerLootstreams(title, platform, username, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LootApi.fetchPlayerLootstreams: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLootApi();
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchPlayerLootstreams($title, $platform, $username, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LootApi->fetchPlayerLootstreams: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LootApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LootApi->new();
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchPlayerLootstreams(title => $title, platform => $platform, username => $username, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LootApi->fetchPlayerLootstreams: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LootApi()
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
locale = locale_example # String | Locale for response

try: 
    # Get player loot streams
    api_response = api_instance.fetch_player_lootstreams(title, platform, username, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LootApi->fetchPlayerLootstreams: %s\n" % e)

Parameters

Path parameters
Name Description
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getSeasonLoot

Get seasonal loot data

Returns seasonal loot and battle pass information


/papi-client/loot/title/{title}/platform/{platform}/list/{list}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/loot/title/{title}/platform/{platform}/list/{list}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LootApi;

import java.io.File;
import java.util.*;

public class LootApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        LootApi apiInstance = new LootApi();
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String list = list_example; // String | List type for loot data
        String locale = locale_example; // String | Locale for response
        try {
            inline_response_200_1 result = apiInstance.getSeasonLoot(title, platform, list, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LootApi#getSeasonLoot");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LootApi;

public class LootApiExample {

    public static void main(String[] args) {
        LootApi apiInstance = new LootApi();
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String list = list_example; // String | List type for loot data
        String locale = locale_example; // String | Locale for response
        try {
            inline_response_200_1 result = apiInstance.getSeasonLoot(title, platform, list, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LootApi#getSeasonLoot");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *list = list_example; // List type for loot data
String *locale = locale_example; // Locale for response

LootApi *apiInstance = [[LootApi alloc] init];

// Get seasonal loot data
[apiInstance getSeasonLootWith:title
    platform:platform
    list:list
    locale:locale
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.LootApi()
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var list = list_example; // {{String}} List type for loot data
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSeasonLoot(title, platform, list, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSeasonLootExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new LootApi();
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var list = list_example;  // String | List type for loot data
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get seasonal loot data
                inline_response_200_1 result = apiInstance.getSeasonLoot(title, platform, list, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LootApi.getSeasonLoot: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiLootApi();
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$list = list_example; // String | List type for loot data
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->getSeasonLoot($title, $platform, $list, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LootApi->getSeasonLoot: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LootApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LootApi->new();
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $list = list_example; # String | List type for loot data
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->getSeasonLoot(title => $title, platform => $platform, list => $list, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LootApi->getSeasonLoot: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LootApi()
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
list = list_example # String | List type for loot data
locale = locale_example # String | Locale for response

try: 
    # Get seasonal loot data
    api_response = api_instance.get_season_loot(title, platform, list, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LootApi->getSeasonLoot: %s\n" % e)

Parameters

Path parameters
Name Description
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
list*
String
List type for loot data
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response (works without authentication)

Status: 404 - Resource not found

Status: 500 - Internal server error


MatchHistory

fetchPlayerFullMatchById

Get full match details (v2)

Returns full match details by match ID. Default version: v2


/papi-client/crm/cod/{version}/title/{title}/platform/{platform}/fullMatch/{gameMode}/{matchId}/{locale}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/title/{title}/platform/{platform}/fullMatch/{gameMode}/{matchId}/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MatchHistoryApi;

import java.io.File;
import java.util.*;

public class MatchHistoryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        MatchHistoryApi apiInstance = new MatchHistoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String gameMode = gameMode_example; // String | Game mode
        String matchId = matchId_example; // String | Match identifier
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPlayerFullMatchById(version, title, platform, gameMode, matchId, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MatchHistoryApi#fetchPlayerFullMatchById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MatchHistoryApi;

public class MatchHistoryApiExample {

    public static void main(String[] args) {
        MatchHistoryApi apiInstance = new MatchHistoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String gameMode = gameMode_example; // String | Game mode
        String matchId = matchId_example; // String | Match identifier
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPlayerFullMatchById(version, title, platform, gameMode, matchId, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MatchHistoryApi#fetchPlayerFullMatchById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *gameMode = gameMode_example; // Game mode
String *matchId = matchId_example; // Match identifier
String *locale = locale_example; // Locale for response

MatchHistoryApi *apiInstance = [[MatchHistoryApi alloc] init];

// Get full match details (v2)
[apiInstance fetchPlayerFullMatchByIdWith:version
    title:title
    platform:platform
    gameMode:gameMode
    matchId:matchId
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.MatchHistoryApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var gameMode = gameMode_example; // {{String}} Game mode
var matchId = matchId_example; // {{String}} Match identifier
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPlayerFullMatchById(version, title, platform, gameMode, matchId, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPlayerFullMatchByIdExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new MatchHistoryApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var gameMode = gameMode_example;  // String | Game mode
            var matchId = matchId_example;  // String | Match identifier
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get full match details (v2)
                ApiResponse result = apiInstance.fetchPlayerFullMatchById(version, title, platform, gameMode, matchId, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MatchHistoryApi.fetchPlayerFullMatchById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiMatchHistoryApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$gameMode = gameMode_example; // String | Game mode
$matchId = matchId_example; // String | Match identifier
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchPlayerFullMatchById($version, $title, $platform, $gameMode, $matchId, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MatchHistoryApi->fetchPlayerFullMatchById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MatchHistoryApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::MatchHistoryApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $gameMode = gameMode_example; # String | Game mode
my $matchId = matchId_example; # String | Match identifier
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchPlayerFullMatchById(version => $version, title => $title, platform => $platform, gameMode => $gameMode, matchId => $matchId, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MatchHistoryApi->fetchPlayerFullMatchById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MatchHistoryApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
gameMode = gameMode_example # String | Game mode
matchId = matchId_example # String | Match identifier
locale = locale_example # String | Locale for response

try: 
    # Get full match details (v2)
    api_response = api_instance.fetch_player_full_match_by_id(version, title, platform, gameMode, matchId, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MatchHistoryApi->fetchPlayerFullMatchById: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
gameMode*
String
Game mode
Required
matchId*
String
Match identifier
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchPlayerRecentMatchesByMode

Get player recent matches by mode (v2)

Returns recent match history for a player by game mode. Default version: v2


/papi-client/crm/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/matches/{gameMode}/start/0/end/0/details

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/matches/{gameMode}/start/0/end/0/details?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MatchHistoryApi;

import java.io.File;
import java.util.*;

public class MatchHistoryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        MatchHistoryApi apiInstance = new MatchHistoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String gameMode = gameMode_example; // String | Game mode
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPlayerRecentMatchesByMode(version, title, platform, username, gameMode, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MatchHistoryApi#fetchPlayerRecentMatchesByMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MatchHistoryApi;

public class MatchHistoryApiExample {

    public static void main(String[] args) {
        MatchHistoryApi apiInstance = new MatchHistoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String gameMode = gameMode_example; // String | Game mode
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPlayerRecentMatchesByMode(version, title, platform, username, gameMode, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MatchHistoryApi#fetchPlayerRecentMatchesByMode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *gameMode = gameMode_example; // Game mode
String *locale = locale_example; // Locale for response

MatchHistoryApi *apiInstance = [[MatchHistoryApi alloc] init];

// Get player recent matches by mode (v2)
[apiInstance fetchPlayerRecentMatchesByModeWith:version
    title:title
    platform:platform
    username:username
    gameMode:gameMode
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.MatchHistoryApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var gameMode = gameMode_example; // {{String}} Game mode
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPlayerRecentMatchesByMode(version, title, platform, username, gameMode, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPlayerRecentMatchesByModeExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new MatchHistoryApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var gameMode = gameMode_example;  // String | Game mode
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get player recent matches by mode (v2)
                ApiResponse result = apiInstance.fetchPlayerRecentMatchesByMode(version, title, platform, username, gameMode, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MatchHistoryApi.fetchPlayerRecentMatchesByMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiMatchHistoryApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$gameMode = gameMode_example; // String | Game mode
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchPlayerRecentMatchesByMode($version, $title, $platform, $username, $gameMode, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MatchHistoryApi->fetchPlayerRecentMatchesByMode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MatchHistoryApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::MatchHistoryApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $gameMode = gameMode_example; # String | Game mode
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchPlayerRecentMatchesByMode(version => $version, title => $title, platform => $platform, username => $username, gameMode => $gameMode, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MatchHistoryApi->fetchPlayerRecentMatchesByMode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MatchHistoryApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
gameMode = gameMode_example # String | Game mode
locale = locale_example # String | Locale for response

try: 
    # Get player recent matches by mode (v2)
    api_response = api_instance.fetch_player_recent_matches_by_mode(version, title, platform, username, gameMode, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MatchHistoryApi->fetchPlayerRecentMatchesByMode: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
gameMode*
String
Game mode
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getMatchHistory

Get player match history (v2)

Returns recent match history for a player. Default version: v2


/papi-client/crm/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/matches/{mode}/start/{start}/end/{end}/details

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/crm/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/matches/{mode}/start/{start}/end/{end}/details?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MatchHistoryApi;

import java.io.File;
import java.util.*;

public class MatchHistoryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        MatchHistoryApi apiInstance = new MatchHistoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String mode = mode_example; // String | Game mode
        Integer start = 56; // Integer | Start index for match history
        Integer end = 56; // Integer | End index for match history
        String locale = locale_example; // String | Locale for response
        try {
            MatchHistoryResponse result = apiInstance.getMatchHistory(version, title, platform, username, mode, start, end, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MatchHistoryApi#getMatchHistory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MatchHistoryApi;

public class MatchHistoryApiExample {

    public static void main(String[] args) {
        MatchHistoryApi apiInstance = new MatchHistoryApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String mode = mode_example; // String | Game mode
        Integer start = 56; // Integer | Start index for match history
        Integer end = 56; // Integer | End index for match history
        String locale = locale_example; // String | Locale for response
        try {
            MatchHistoryResponse result = apiInstance.getMatchHistory(version, title, platform, username, mode, start, end, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MatchHistoryApi#getMatchHistory");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *mode = mode_example; // Game mode
Integer *start = 56; // Start index for match history
Integer *end = 56; // End index for match history
String *locale = locale_example; // Locale for response

MatchHistoryApi *apiInstance = [[MatchHistoryApi alloc] init];

// Get player match history (v2)
[apiInstance getMatchHistoryWith:version
    title:title
    platform:platform
    username:username
    mode:mode
    start:start
    end:end
    locale:locale
              completionHandler: ^(MatchHistoryResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.MatchHistoryApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var mode = mode_example; // {{String}} Game mode
var start = 56; // {{Integer}} Start index for match history
var end = 56; // {{Integer}} End index for match history
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMatchHistory(version, title, platform, username, mode, start, end, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMatchHistoryExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new MatchHistoryApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var mode = mode_example;  // String | Game mode
            var start = 56;  // Integer | Start index for match history
            var end = 56;  // Integer | End index for match history
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get player match history (v2)
                MatchHistoryResponse result = apiInstance.getMatchHistory(version, title, platform, username, mode, start, end, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MatchHistoryApi.getMatchHistory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiMatchHistoryApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$mode = mode_example; // String | Game mode
$start = 56; // Integer | Start index for match history
$end = 56; // Integer | End index for match history
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->getMatchHistory($version, $title, $platform, $username, $mode, $start, $end, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MatchHistoryApi->getMatchHistory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MatchHistoryApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::MatchHistoryApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $mode = mode_example; # String | Game mode
my $start = 56; # Integer | Start index for match history
my $end = 56; # Integer | End index for match history
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->getMatchHistory(version => $version, title => $title, platform => $platform, username => $username, mode => $mode, start => $start, end => $end, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MatchHistoryApi->getMatchHistory: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MatchHistoryApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
mode = mode_example # String | Game mode
start = 56 # Integer | Start index for match history
end = 56 # Integer | End index for match history
locale = locale_example # String | Locale for response

try: 
    # Get player match history (v2)
    api_response = api_instance.get_match_history(version, title, platform, username, mode, start, end, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MatchHistoryApi->getMatchHistory: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
mode*
String
Game mode
Required
start*
Integer
Start index for match history
Required
end*
Integer
End index for match history
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 404 - Resource not found

Status: 500 - Internal server error


PlayerStatistics

fetchPlayerFriendStatsByMode

Get player friend stats by mode (v1)

Returns friend statistics for a specific game mode. Default version: v1


/papi-client/stats/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/profile/friends/type/{gameMode}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/stats/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/profile/friends/type/{gameMode}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlayerStatisticsApi;

import java.io.File;
import java.util.*;

public class PlayerStatisticsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        PlayerStatisticsApi apiInstance = new PlayerStatisticsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String gameMode = gameMode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.fetchPlayerFriendStatsByMode(version, title, platform, username, gameMode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayerStatisticsApi#fetchPlayerFriendStatsByMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlayerStatisticsApi;

public class PlayerStatisticsApiExample {

    public static void main(String[] args) {
        PlayerStatisticsApi apiInstance = new PlayerStatisticsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String gameMode = gameMode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.fetchPlayerFriendStatsByMode(version, title, platform, username, gameMode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayerStatisticsApi#fetchPlayerFriendStatsByMode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *gameMode = gameMode_example; // Game mode

PlayerStatisticsApi *apiInstance = [[PlayerStatisticsApi alloc] init];

// Get player friend stats by mode (v1)
[apiInstance fetchPlayerFriendStatsByModeWith:version
    title:title
    platform:platform
    username:username
    gameMode:gameMode
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.PlayerStatisticsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var gameMode = gameMode_example; // {{String}} Game mode

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPlayerFriendStatsByMode(version, title, platform, username, gameMode, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPlayerFriendStatsByModeExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new PlayerStatisticsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var gameMode = gameMode_example;  // String | Game mode

            try
            {
                // Get player friend stats by mode (v1)
                ApiResponse result = apiInstance.fetchPlayerFriendStatsByMode(version, title, platform, username, gameMode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayerStatisticsApi.fetchPlayerFriendStatsByMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiPlayerStatisticsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$gameMode = gameMode_example; // String | Game mode

try {
    $result = $api_instance->fetchPlayerFriendStatsByMode($version, $title, $platform, $username, $gameMode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlayerStatisticsApi->fetchPlayerFriendStatsByMode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlayerStatisticsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PlayerStatisticsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $gameMode = gameMode_example; # String | Game mode

eval { 
    my $result = $api_instance->fetchPlayerFriendStatsByMode(version => $version, title => $title, platform => $platform, username => $username, gameMode => $gameMode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlayerStatisticsApi->fetchPlayerFriendStatsByMode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PlayerStatisticsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
gameMode = gameMode_example # String | Game mode

try: 
    # Get player friend stats by mode (v1)
    api_response = api_instance.fetch_player_friend_stats_by_mode(version, title, platform, username, gameMode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlayerStatisticsApi->fetchPlayerFriendStatsByMode: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
gameMode*
String
Game mode
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchPlayerStatsByMode

Get player stats by mode (alternative) (v1)

Returns player statistics for a specific game mode (alternative endpoint). Default version: v1


/papi-client/stats/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/profile/type/{gameMode}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/stats/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/profile/type/{gameMode}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlayerStatisticsApi;

import java.io.File;
import java.util.*;

public class PlayerStatisticsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        PlayerStatisticsApi apiInstance = new PlayerStatisticsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String gameMode = gameMode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.fetchPlayerStatsByMode(version, title, platform, username, gameMode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayerStatisticsApi#fetchPlayerStatsByMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlayerStatisticsApi;

public class PlayerStatisticsApiExample {

    public static void main(String[] args) {
        PlayerStatisticsApi apiInstance = new PlayerStatisticsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String gameMode = gameMode_example; // String | Game mode
        try {
            ApiResponse result = apiInstance.fetchPlayerStatsByMode(version, title, platform, username, gameMode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayerStatisticsApi#fetchPlayerStatsByMode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *gameMode = gameMode_example; // Game mode

PlayerStatisticsApi *apiInstance = [[PlayerStatisticsApi alloc] init];

// Get player stats by mode (alternative) (v1)
[apiInstance fetchPlayerStatsByModeWith:version
    title:title
    platform:platform
    username:username
    gameMode:gameMode
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.PlayerStatisticsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var gameMode = gameMode_example; // {{String}} Game mode

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPlayerStatsByMode(version, title, platform, username, gameMode, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPlayerStatsByModeExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new PlayerStatisticsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var gameMode = gameMode_example;  // String | Game mode

            try
            {
                // Get player stats by mode (alternative) (v1)
                ApiResponse result = apiInstance.fetchPlayerStatsByMode(version, title, platform, username, gameMode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayerStatisticsApi.fetchPlayerStatsByMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiPlayerStatisticsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$gameMode = gameMode_example; // String | Game mode

try {
    $result = $api_instance->fetchPlayerStatsByMode($version, $title, $platform, $username, $gameMode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlayerStatisticsApi->fetchPlayerStatsByMode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlayerStatisticsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PlayerStatisticsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $gameMode = gameMode_example; # String | Game mode

eval { 
    my $result = $api_instance->fetchPlayerStatsByMode(version => $version, title => $title, platform => $platform, username => $username, gameMode => $gameMode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlayerStatisticsApi->fetchPlayerStatsByMode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PlayerStatisticsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
gameMode = gameMode_example # String | Game mode

try: 
    # Get player stats by mode (alternative) (v1)
    api_response = api_instance.fetch_player_stats_by_mode(version, title, platform, username, gameMode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlayerStatisticsApi->fetchPlayerStatsByMode: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
gameMode*
String
Game mode
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchPlayerStatsByModeAndPeriod

Get player stats by mode and period (v1)

Returns player statistics for specific game mode and time periods. Default version: v1


/papi-client/stats/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/profile/type/{gameMode}/periods/{periods}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/stats/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/profile/type/{gameMode}/periods/{periods}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlayerStatisticsApi;

import java.io.File;
import java.util.*;

public class PlayerStatisticsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        PlayerStatisticsApi apiInstance = new PlayerStatisticsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String gameMode = gameMode_example; // String | Game mode
        String periods = periods_example; // String | Time periods for stats
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPlayerStatsByModeAndPeriod(version, title, platform, username, gameMode, periods, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayerStatisticsApi#fetchPlayerStatsByModeAndPeriod");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlayerStatisticsApi;

public class PlayerStatisticsApiExample {

    public static void main(String[] args) {
        PlayerStatisticsApi apiInstance = new PlayerStatisticsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String gameMode = gameMode_example; // String | Game mode
        String periods = periods_example; // String | Time periods for stats
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchPlayerStatsByModeAndPeriod(version, title, platform, username, gameMode, periods, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayerStatisticsApi#fetchPlayerStatsByModeAndPeriod");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *gameMode = gameMode_example; // Game mode
String *periods = periods_example; // Time periods for stats
String *locale = locale_example; // Locale for response

PlayerStatisticsApi *apiInstance = [[PlayerStatisticsApi alloc] init];

// Get player stats by mode and period (v1)
[apiInstance fetchPlayerStatsByModeAndPeriodWith:version
    title:title
    platform:platform
    username:username
    gameMode:gameMode
    periods:periods
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.PlayerStatisticsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var gameMode = gameMode_example; // {{String}} Game mode
var periods = periods_example; // {{String}} Time periods for stats
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPlayerStatsByModeAndPeriod(version, title, platform, username, gameMode, periods, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPlayerStatsByModeAndPeriodExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new PlayerStatisticsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var gameMode = gameMode_example;  // String | Game mode
            var periods = periods_example;  // String | Time periods for stats
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get player stats by mode and period (v1)
                ApiResponse result = apiInstance.fetchPlayerStatsByModeAndPeriod(version, title, platform, username, gameMode, periods, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayerStatisticsApi.fetchPlayerStatsByModeAndPeriod: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiPlayerStatisticsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$gameMode = gameMode_example; // String | Game mode
$periods = periods_example; // String | Time periods for stats
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchPlayerStatsByModeAndPeriod($version, $title, $platform, $username, $gameMode, $periods, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlayerStatisticsApi->fetchPlayerStatsByModeAndPeriod: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlayerStatisticsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PlayerStatisticsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $gameMode = gameMode_example; # String | Game mode
my $periods = periods_example; # String | Time periods for stats
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchPlayerStatsByModeAndPeriod(version => $version, title => $title, platform => $platform, username => $username, gameMode => $gameMode, periods => $periods, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlayerStatisticsApi->fetchPlayerStatsByModeAndPeriod: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PlayerStatisticsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
gameMode = gameMode_example # String | Game mode
periods = periods_example # String | Time periods for stats
locale = locale_example # String | Locale for response

try: 
    # Get player stats by mode and period (v1)
    api_response = api_instance.fetch_player_stats_by_mode_and_period(version, title, platform, username, gameMode, periods, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlayerStatisticsApi->fetchPlayerStatsByModeAndPeriod: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
gameMode*
String
Game mode
Required
periods*
String
Time periods for stats
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


getPlayerStats

Get player statistics (v1)

Returns player statistics for a specific game, platform, and mode. Default version: v1


/papi-client/stats/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/profile/type/{mode}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/stats/cod/{version}/title/{title}/platform/{platform}/gamer/{username}/profile/type/{mode}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlayerStatisticsApi;

import java.io.File;
import java.util.*;

public class PlayerStatisticsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        PlayerStatisticsApi apiInstance = new PlayerStatisticsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String mode = mode_example; // String | Game mode
        try {
            PlayerStatsResponse result = apiInstance.getPlayerStats(version, title, platform, username, mode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayerStatisticsApi#getPlayerStats");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlayerStatisticsApi;

public class PlayerStatisticsApiExample {

    public static void main(String[] args) {
        PlayerStatisticsApi apiInstance = new PlayerStatisticsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String title = title_example; // String | Game title code
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String mode = mode_example; // String | Game mode
        try {
            PlayerStatsResponse result = apiInstance.getPlayerStats(version, title, platform, username, mode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlayerStatisticsApi#getPlayerStats");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *title = title_example; // Game title code
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *mode = mode_example; // Game mode

PlayerStatisticsApi *apiInstance = [[PlayerStatisticsApi alloc] init];

// Get player statistics (v1)
[apiInstance getPlayerStatsWith:version
    title:title
    platform:platform
    username:username
    mode:mode
              completionHandler: ^(PlayerStatsResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.PlayerStatisticsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var title = title_example; // {{String}} Game title code
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var mode = mode_example; // {{String}} Game mode

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPlayerStats(version, title, platform, username, mode, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPlayerStatsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new PlayerStatisticsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var title = title_example;  // String | Game title code
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var mode = mode_example;  // String | Game mode

            try
            {
                // Get player statistics (v1)
                PlayerStatsResponse result = apiInstance.getPlayerStats(version, title, platform, username, mode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayerStatisticsApi.getPlayerStats: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiPlayerStatisticsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$title = title_example; // String | Game title code
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$mode = mode_example; // String | Game mode

try {
    $result = $api_instance->getPlayerStats($version, $title, $platform, $username, $mode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlayerStatisticsApi->getPlayerStats: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlayerStatisticsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PlayerStatisticsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $title = title_example; # String | Game title code
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $mode = mode_example; # String | Game mode

eval { 
    my $result = $api_instance->getPlayerStats(version => $version, title => $title, platform => $platform, username => $username, mode => $mode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PlayerStatisticsApi->getPlayerStats: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PlayerStatisticsApi()
version = version_example # String | API version (v1, v2, v3, v4)
title = title_example # String | Game title code
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
mode = mode_example # String | Game mode

try: 
    # Get player statistics (v1)
    api_response = api_instance.get_player_stats(version, title, platform, username, mode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PlayerStatisticsApi->getPlayerStats: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
title*
String
Game title code
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
mode*
String
Game mode
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 404 - Resource not found

Status: 500 - Internal server error


Preferences

fetchPreferencesList

Get preferences list (v1)

Returns user's preferences list. Default version: v1


/papi-client/preferences/{version}/platform/{platform}/gamer/{username}/list

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/preferences/{version}/platform/{platform}/gamer/{username}/list?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PreferencesApi;

import java.io.File;
import java.util.*;

public class PreferencesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        PreferencesApi apiInstance = new PreferencesApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchPreferencesList(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#fetchPreferencesList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PreferencesApi;

public class PreferencesApiExample {

    public static void main(String[] args) {
        PreferencesApi apiInstance = new PreferencesApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        try {
            ApiResponse result = apiInstance.fetchPreferencesList(version, platform, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#fetchPreferencesList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)

PreferencesApi *apiInstance = [[PreferencesApi alloc] init];

// Get preferences list (v1)
[apiInstance fetchPreferencesListWith:version
    platform:platform
    username:username
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.PreferencesApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchPreferencesList(version, platform, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchPreferencesListExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new PreferencesApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)

            try
            {
                // Get preferences list (v1)
                ApiResponse result = apiInstance.fetchPreferencesList(version, platform, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PreferencesApi.fetchPreferencesList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiPreferencesApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)

try {
    $result = $api_instance->fetchPreferencesList($version, $platform, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PreferencesApi->fetchPreferencesList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PreferencesApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PreferencesApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)

eval { 
    my $result = $api_instance->fetchPreferencesList(version => $version, platform => $platform, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PreferencesApi->fetchPreferencesList: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PreferencesApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)

try: 
    # Get preferences list (v1)
    api_response = api_instance.fetch_preferences_list(version, platform, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PreferencesApi->fetchPreferencesList: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendPreference

Set preference (v1)

Set a user preference. Default version: v1


/papi-client/preferences/{version}/platform/{platform}/gamer/{username}/preference/{preference}/set/{set_id}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/preferences/{version}/platform/{platform}/gamer/{username}/preference/{preference}/set/{set_id}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PreferencesApi;

import java.io.File;
import java.util.*;

public class PreferencesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        PreferencesApi apiInstance = new PreferencesApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String preference = preference_example; // String | Preference identifier
        String setId = setId_example; // String | Set identifier for preferences
        try {
            ApiResponse result = apiInstance.sendPreference(version, platform, username, preference, setId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#sendPreference");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PreferencesApi;

public class PreferencesApiExample {

    public static void main(String[] args) {
        PreferencesApi apiInstance = new PreferencesApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String preference = preference_example; // String | Preference identifier
        String setId = setId_example; // String | Set identifier for preferences
        try {
            ApiResponse result = apiInstance.sendPreference(version, platform, username, preference, setId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#sendPreference");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *preference = preference_example; // Preference identifier
String *setId = setId_example; // Set identifier for preferences

PreferencesApi *apiInstance = [[PreferencesApi alloc] init];

// Set preference (v1)
[apiInstance sendPreferenceWith:version
    platform:platform
    username:username
    preference:preference
    setId:setId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.PreferencesApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var preference = preference_example; // {{String}} Preference identifier
var setId = setId_example; // {{String}} Set identifier for preferences

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendPreference(version, platform, username, preference, setId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendPreferenceExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new PreferencesApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var preference = preference_example;  // String | Preference identifier
            var setId = setId_example;  // String | Set identifier for preferences

            try
            {
                // Set preference (v1)
                ApiResponse result = apiInstance.sendPreference(version, platform, username, preference, setId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PreferencesApi.sendPreference: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiPreferencesApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$preference = preference_example; // String | Preference identifier
$setId = setId_example; // String | Set identifier for preferences

try {
    $result = $api_instance->sendPreference($version, $platform, $username, $preference, $setId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PreferencesApi->sendPreference: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PreferencesApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PreferencesApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $preference = preference_example; # String | Preference identifier
my $setId = setId_example; # String | Set identifier for preferences

eval { 
    my $result = $api_instance->sendPreference(version => $version, platform => $platform, username => $username, preference => $preference, setId => $setId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PreferencesApi->sendPreference: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PreferencesApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
preference = preference_example # String | Preference identifier
setId = setId_example # String | Set identifier for preferences

try: 
    # Set preference (v1)
    api_response = api_instance.send_preference(version, platform, username, preference, setId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PreferencesApi->sendPreference: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
preference*
String
Preference identifier
Required
set_id*
String
Set identifier for preferences
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendUnoPreference

Set UNO preference (v1)

Set a preference for a UNO ID. Default version: v1


/papi-client/preferences/{version}/platform/uno/id/{unoId}/preference/{preference}/set/{value}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/preferences/{version}/platform/uno/id/{unoId}/preference/{preference}/set/{value}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PreferencesApi;

import java.io.File;
import java.util.*;

public class PreferencesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        PreferencesApi apiInstance = new PreferencesApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        String preference = preference_example; // String | Preference identifier
        String value = value_example; // String | Value for preference setting
        try {
            ApiResponse result = apiInstance.sendUnoPreference(version, unoId, preference, value);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#sendUnoPreference");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PreferencesApi;

public class PreferencesApiExample {

    public static void main(String[] args) {
        PreferencesApi apiInstance = new PreferencesApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        String preference = preference_example; // String | Preference identifier
        String value = value_example; // String | Value for preference setting
        try {
            ApiResponse result = apiInstance.sendUnoPreference(version, unoId, preference, value);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#sendUnoPreference");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification
String *preference = preference_example; // Preference identifier
String *value = value_example; // Value for preference setting

PreferencesApi *apiInstance = [[PreferencesApi alloc] init];

// Set UNO preference (v1)
[apiInstance sendUnoPreferenceWith:version
    unoId:unoId
    preference:preference
    value:value
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.PreferencesApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification
var preference = preference_example; // {{String}} Preference identifier
var value = value_example; // {{String}} Value for preference setting

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendUnoPreference(version, unoId, preference, value, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendUnoPreferenceExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new PreferencesApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification
            var preference = preference_example;  // String | Preference identifier
            var value = value_example;  // String | Value for preference setting

            try
            {
                // Set UNO preference (v1)
                ApiResponse result = apiInstance.sendUnoPreference(version, unoId, preference, value);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PreferencesApi.sendUnoPreference: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiPreferencesApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification
$preference = preference_example; // String | Preference identifier
$value = value_example; // String | Value for preference setting

try {
    $result = $api_instance->sendUnoPreference($version, $unoId, $preference, $value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PreferencesApi->sendUnoPreference: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PreferencesApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PreferencesApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification
my $preference = preference_example; # String | Preference identifier
my $value = value_example; # String | Value for preference setting

eval { 
    my $result = $api_instance->sendUnoPreference(version => $version, unoId => $unoId, preference => $preference, value => $value);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PreferencesApi->sendUnoPreference: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PreferencesApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification
preference = preference_example # String | Preference identifier
value = value_example # String | Value for preference setting

try: 
    # Set UNO preference (v1)
    api_response = api_instance.send_uno_preference(version, unoId, preference, value)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PreferencesApi->sendUnoPreference: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
preference*
String
Preference identifier
Required
value*
String
Value for preference setting
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


Squads

fetchChallengeHistory

Get challenge history (v2)

Returns challenge history (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/challenge/history/page/{page}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/plain"\
"https://callofduty.com/api/squad/api/{version}/challenge/history/page/{page}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        Integer page = 56; // Integer | Page number for pagination
        try {
            ApiResponse result = apiInstance.fetchChallengeHistory(version, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchChallengeHistory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        Integer page = 56; // Integer | Page number for pagination
        try {
            ApiResponse result = apiInstance.fetchChallengeHistory(version, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchChallengeHistory");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
Integer *page = 56; // Page number for pagination

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Get challenge history (v2)
[apiInstance fetchChallengeHistoryWith:version
    page:page
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var page = 56; // {{Integer}} Page number for pagination

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchChallengeHistory(version, page, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchChallengeHistoryExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var page = 56;  // Integer | Page number for pagination

            try
            {
                // Get challenge history (v2)
                ApiResponse result = apiInstance.fetchChallengeHistory(version, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchChallengeHistory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$page = 56; // Integer | Page number for pagination

try {
    $result = $api_instance->fetchChallengeHistory($version, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchChallengeHistory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $page = 56; # Integer | Page number for pagination

eval { 
    my $result = $api_instance->fetchChallengeHistory(version => $version, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchChallengeHistory: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)
page = 56 # Integer | Page number for pagination

try: 
    # Get challenge history (v2)
    api_response = api_instance.fetch_challenge_history(version, page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchChallengeHistory: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
page*
Integer
Page number for pagination
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchChallengeTournament

Get current challenge tournament (v2)

Returns current challenge tournament (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/challenge/lookup/current

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/plain"\
"https://callofduty.com/api/squad/api/{version}/challenge/lookup/current?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchChallengeTournament(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchChallengeTournament");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchChallengeTournament(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchChallengeTournament");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Get current challenge tournament (v2)
[apiInstance fetchChallengeTournamentWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchChallengeTournament(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchChallengeTournamentExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Get current challenge tournament (v2)
                ApiResponse result = apiInstance.fetchChallengeTournament(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchChallengeTournament: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->fetchChallengeTournament($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchChallengeTournament: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->fetchChallengeTournament(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchChallengeTournament: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Get current challenge tournament (v2)
    api_response = api_instance.fetch_challenge_tournament(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchChallengeTournament: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchClaimRewards

Claim rewards (v2)

Claim available rewards (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/rewards/claim

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/plain"\
"https://callofduty.com/api/squad/api/{version}/rewards/claim?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchClaimRewards(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchClaimRewards");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchClaimRewards(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchClaimRewards");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Claim rewards (v2)
[apiInstance fetchClaimRewardsWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchClaimRewards(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchClaimRewardsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Claim rewards (v2)
                ApiResponse result = apiInstance.fetchClaimRewards(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchClaimRewards: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->fetchClaimRewards($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchClaimRewards: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->fetchClaimRewards(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchClaimRewards: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Claim rewards (v2)
    api_response = api_instance.fetch_claim_rewards(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchClaimRewards: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchRewards

Get current rewards (v2)

Returns current rewards (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/rewards/current

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/plain"\
"https://callofduty.com/api/squad/api/{version}/rewards/current?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchRewards(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchRewards");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchRewards(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchRewards");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Get current rewards (v2)
[apiInstance fetchRewardsWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchRewards(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchRewardsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Get current rewards (v2)
                ApiResponse result = apiInstance.fetchRewards(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchRewards: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->fetchRewards($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchRewards: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->fetchRewards(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchRewards: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Get current rewards (v2)
    api_response = api_instance.fetch_rewards(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchRewards: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchSquad

Get my squad (v2)

Returns user's squad (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/squad/lookup/mine

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/squad/lookup/mine?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchSquad(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquad");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchSquad(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquad");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Get my squad (v2)
[apiInstance fetchSquadWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchSquad(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchSquadExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Get my squad (v2)
                ApiResponse result = apiInstance.fetchSquad(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchSquad: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->fetchSquad($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchSquad: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->fetchSquad(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchSquad: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Get my squad (v2)
    api_response = api_instance.fetch_squad(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchSquad: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchSquadJoin

Join squad (v2)

Join a squad (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/squad/join

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/squad/join?joinName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String joinName = joinName_example; // String | Squad name to join
        try {
            ApiResponse result = apiInstance.fetchSquadJoin(version, joinName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadJoin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String joinName = joinName_example; // String | Squad name to join
        try {
            ApiResponse result = apiInstance.fetchSquadJoin(version, joinName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadJoin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *joinName = joinName_example; // Squad name to join

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Join squad (v2)
[apiInstance fetchSquadJoinWith:version
    joinName:joinName
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var joinName = joinName_example; // {{String}} Squad name to join

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchSquadJoin(version, joinName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchSquadJoinExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var joinName = joinName_example;  // String | Squad name to join

            try
            {
                // Join squad (v2)
                ApiResponse result = apiInstance.fetchSquadJoin(version, joinName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchSquadJoin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$joinName = joinName_example; // String | Squad name to join

try {
    $result = $api_instance->fetchSquadJoin($version, $joinName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchSquadJoin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $joinName = joinName_example; # String | Squad name to join

eval { 
    my $result = $api_instance->fetchSquadJoin(version => $version, joinName => $joinName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchSquadJoin: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)
joinName = joinName_example # String | Squad name to join

try: 
    # Join squad (v2)
    api_response = api_instance.fetch_squad_join(version, joinName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchSquadJoin: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description
joinName*
String
Squad name to join
Required

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchSquadLeave

Leave squad (v2)

Leave current squad (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/squad/leave

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/squad/leave?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchSquadLeave(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadLeave");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.fetchSquadLeave(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadLeave");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Leave squad (v2)
[apiInstance fetchSquadLeaveWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchSquadLeave(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchSquadLeaveExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Leave squad (v2)
                ApiResponse result = apiInstance.fetchSquadLeave(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchSquadLeave: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->fetchSquadLeave($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchSquadLeave: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->fetchSquadLeave(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchSquadLeave: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Leave squad (v2)
    api_response = api_instance.fetch_squad_leave(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchSquadLeave: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchSquadObjectByIdentity

Get squad by identity (v2)

Returns squad for a platform user (DEPRECATED - DNS issues). Default version: v2


/api/{version}/squad/lookup/platform/{platform}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/api/{version}/squad/lookup/platform/{platform}?gamerTag="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String gamerTag = gamerTag_example; // String | Gamer tag to lookup
        try {
            ApiResponse result = apiInstance.fetchSquadObjectByIdentity(version, platform, gamerTag);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadObjectByIdentity");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String gamerTag = gamerTag_example; // String | Gamer tag to lookup
        try {
            ApiResponse result = apiInstance.fetchSquadObjectByIdentity(version, platform, gamerTag);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadObjectByIdentity");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *gamerTag = gamerTag_example; // Gamer tag to lookup

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Get squad by identity (v2)
[apiInstance fetchSquadObjectByIdentityWith:version
    platform:platform
    gamerTag:gamerTag
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var gamerTag = gamerTag_example; // {{String}} Gamer tag to lookup

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchSquadObjectByIdentity(version, platform, gamerTag, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchSquadObjectByIdentityExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var gamerTag = gamerTag_example;  // String | Gamer tag to lookup

            try
            {
                // Get squad by identity (v2)
                ApiResponse result = apiInstance.fetchSquadObjectByIdentity(version, platform, gamerTag);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchSquadObjectByIdentity: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$gamerTag = gamerTag_example; // String | Gamer tag to lookup

try {
    $result = $api_instance->fetchSquadObjectByIdentity($version, $platform, $gamerTag);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchSquadObjectByIdentity: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $gamerTag = gamerTag_example; # String | Gamer tag to lookup

eval { 
    my $result = $api_instance->fetchSquadObjectByIdentity(version => $version, platform => $platform, gamerTag => $gamerTag);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchSquadObjectByIdentity: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
gamerTag = gamerTag_example # String | Gamer tag to lookup

try: 
    # Get squad by identity (v2)
    api_response = api_instance.fetch_squad_object_by_identity(version, platform, gamerTag)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchSquadObjectByIdentity: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
Query parameters
Name Description
gamerTag*
String
Gamer tag to lookup
Required

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchSquadObjectByName

Search squad by name (v2)

Search for squads by name (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/squad/search

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/squad/search?searchName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String searchName = searchName_example; // String | Squad name to search for
        try {
            ApiResponse result = apiInstance.fetchSquadObjectByName(version, searchName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadObjectByName");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String searchName = searchName_example; // String | Squad name to search for
        try {
            ApiResponse result = apiInstance.fetchSquadObjectByName(version, searchName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadObjectByName");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *searchName = searchName_example; // Squad name to search for

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Search squad by name (v2)
[apiInstance fetchSquadObjectByNameWith:version
    searchName:searchName
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var searchName = searchName_example; // {{String}} Squad name to search for

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchSquadObjectByName(version, searchName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchSquadObjectByNameExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var searchName = searchName_example;  // String | Squad name to search for

            try
            {
                // Search squad by name (v2)
                ApiResponse result = apiInstance.fetchSquadObjectByName(version, searchName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchSquadObjectByName: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$searchName = searchName_example; // String | Squad name to search for

try {
    $result = $api_instance->fetchSquadObjectByName($version, $searchName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchSquadObjectByName: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $searchName = searchName_example; # String | Squad name to search for

eval { 
    my $result = $api_instance->fetchSquadObjectByName(version => $version, searchName => $searchName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchSquadObjectByName: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)
searchName = searchName_example # String | Squad name to search for

try: 
    # Search squad by name (v2)
    api_response = api_instance.fetch_squad_object_by_name(version, searchName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchSquadObjectByName: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description
searchName*
String
Squad name to search for
Required

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


fetchSquadReport

Get squad report (v2)

Get squad report (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/squad/report/{name}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/squad/report/{name}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String name = name_example; // String | Squad name
        try {
            ApiResponse result = apiInstance.fetchSquadReport(version, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadReport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String name = name_example; // String | Squad name
        try {
            ApiResponse result = apiInstance.fetchSquadReport(version, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#fetchSquadReport");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *name = name_example; // Squad name

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Get squad report (v2)
[apiInstance fetchSquadReportWith:version
    name:name
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var name = name_example; // {{String}} Squad name

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchSquadReport(version, name, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchSquadReportExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var name = name_example;  // String | Squad name

            try
            {
                // Get squad report (v2)
                ApiResponse result = apiInstance.fetchSquadReport(version, name);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.fetchSquadReport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$name = name_example; // String | Squad name

try {
    $result = $api_instance->fetchSquadReport($version, $name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->fetchSquadReport: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $name = name_example; # String | Squad name

eval { 
    my $result = $api_instance->fetchSquadReport(version => $version, name => $name);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->fetchSquadReport: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)
name = name_example # String | Squad name

try: 
    # Get squad report (v2)
    api_response = api_instance.fetch_squad_report(version, name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->fetchSquadReport: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
name*
String
Squad name
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


getSquadClubs

Get squad clubs (v1)

Returns squad clubs (DEPRECATED - DNS issues). Default version: v1


/squad/api/{version}/clubs/{unoId}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/clubs/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.getSquadClubs(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#getSquadClubs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.getSquadClubs(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#getSquadClubs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Get squad clubs (v1)
[apiInstance getSquadClubsWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSquadClubs(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSquadClubsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Get squad clubs (v1)
                ApiResponse result = apiInstance.getSquadClubs(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.getSquadClubs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->getSquadClubs($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->getSquadClubs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->getSquadClubs(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->getSquadClubs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Get squad clubs (v1)
    api_response = api_instance.get_squad_clubs(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->getSquadClubs: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


getSquadMembers

Get squad members (v1)

Returns squad members (DEPRECATED - DNS issues). Default version: v1


/squad/api/{version}/members/{unoId}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/members/{unoId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.getSquadMembers(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#getSquadMembers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String unoId = unoId_example; // String | UNO ID for user identification
        try {
            ApiResponse result = apiInstance.getSquadMembers(version, unoId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#getSquadMembers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *unoId = unoId_example; // UNO ID for user identification

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Get squad members (v1)
[apiInstance getSquadMembersWith:version
    unoId:unoId
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var unoId = unoId_example; // {{String}} UNO ID for user identification

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSquadMembers(version, unoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSquadMembersExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var unoId = unoId_example;  // String | UNO ID for user identification

            try
            {
                // Get squad members (v1)
                ApiResponse result = apiInstance.getSquadMembers(version, unoId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.getSquadMembers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$unoId = unoId_example; // String | UNO ID for user identification

try {
    $result = $api_instance->getSquadMembers($version, $unoId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->getSquadMembers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $unoId = unoId_example; # String | UNO ID for user identification

eval { 
    my $result = $api_instance->getSquadMembers(version => $version, unoId => $unoId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->getSquadMembers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)
unoId = unoId_example # String | UNO ID for user identification

try: 
    # Get squad members (v1)
    api_response = api_instance.get_squad_members(version, unoId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->getSquadMembers: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
unoId*
String
UNO ID for user identification
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


sendSquadCreate

Create squad (v2)

Create a new squad (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/squad/create

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/squad/create?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.sendSquadCreate(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#sendSquadCreate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.sendSquadCreate(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#sendSquadCreate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Create squad (v2)
[apiInstance sendSquadCreateWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendSquadCreate(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendSquadCreateExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Create squad (v2)
                ApiResponse result = apiInstance.sendSquadCreate(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.sendSquadCreate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->sendSquadCreate($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->sendSquadCreate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->sendSquadCreate(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->sendSquadCreate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Create squad (v2)
    api_response = api_instance.send_squad_create(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->sendSquadCreate: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


sendSquadEdit

Edit squad (v2)

Update squad information (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/squad/update

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/squad/update?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.sendSquadEdit(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#sendSquadEdit");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.sendSquadEdit(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#sendSquadEdit");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Edit squad (v2)
[apiInstance sendSquadEditWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendSquadEdit(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendSquadEditExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Edit squad (v2)
                ApiResponse result = apiInstance.sendSquadEdit(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.sendSquadEdit: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->sendSquadEdit($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->sendSquadEdit: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->sendSquadEdit(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->sendSquadEdit: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Edit squad (v2)
    api_response = api_instance.send_squad_edit(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->sendSquadEdit: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


sendSquadRemoveMember

Remove squad members (v2)

Remove members from squad (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/squad/removeMembers

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html,text/plain"\
"https://callofduty.com/api/squad/api/{version}/squad/removeMembers?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.sendSquadRemoveMember(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#sendSquadRemoveMember");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.sendSquadRemoveMember(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#sendSquadRemoveMember");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Remove squad members (v2)
[apiInstance sendSquadRemoveMemberWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendSquadRemoveMember(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendSquadRemoveMemberExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Remove squad members (v2)
                ApiResponse result = apiInstance.sendSquadRemoveMember(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.sendSquadRemoveMember: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->sendSquadRemoveMember($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->sendSquadRemoveMember: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->sendSquadRemoveMember(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->sendSquadRemoveMember: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Remove squad members (v2)
    api_response = api_instance.send_squad_remove_member(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->sendSquadRemoveMember: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error

Status: default - DNS resolution error - squads.callofduty.com domain not found


sendUserFeedback

Send user feedback (v2)

Send user feedback (DEPRECATED - DNS issues). Default version: v2


/squad/api/{version}/user/feedback

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/plain"\
"https://callofduty.com/api/squad/api/{version}/user/feedback?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SquadsApi;

import java.io.File;
import java.util.*;

public class SquadsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.sendUserFeedback(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#sendUserFeedback");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SquadsApi;

public class SquadsApiExample {

    public static void main(String[] args) {
        SquadsApi apiInstance = new SquadsApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        try {
            ApiResponse result = apiInstance.sendUserFeedback(version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SquadsApi#sendUserFeedback");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)

SquadsApi *apiInstance = [[SquadsApi alloc] init];

// Send user feedback (v2)
[apiInstance sendUserFeedbackWith:version
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.SquadsApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendUserFeedback(version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendUserFeedbackExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new SquadsApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)

            try
            {
                // Send user feedback (v2)
                ApiResponse result = apiInstance.sendUserFeedback(version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SquadsApi.sendUserFeedback: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiSquadsApi();
$version = version_example; // String | API version (v1, v2, v3, v4)

try {
    $result = $api_instance->sendUserFeedback($version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SquadsApi->sendUserFeedback: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SquadsApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SquadsApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)

eval { 
    my $result = $api_instance->sendUserFeedback(version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SquadsApi->sendUserFeedback: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SquadsApi()
version = version_example # String | API version (v1, v2, v3, v4)

try: 
    # Send user feedback (v2)
    api_response = api_instance.send_user_feedback(version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SquadsApi->sendUserFeedback: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: default - DNS resolution error - squads.callofduty.com domain not found


UserFeed

fetchUserFeedAchievements

Get user feed achievements (v1)

Returns friend feed events and achievements. Default version: v1


/papi-client/userfeed/{version}/friendFeed/platform/{platform}/gamer/{username}/friendFeedEvents/{locale}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/userfeed/{version}/friendFeed/platform/{platform}/gamer/{username}/friendFeedEvents/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserFeedApi;

import java.io.File;
import java.util.*;

public class UserFeedApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchUserFeedAchievements(version, platform, username, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#fetchUserFeedAchievements");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserFeedApi;

public class UserFeedApiExample {

    public static void main(String[] args) {
        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
        String username = username_example; // String | Player username (URL encoded)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchUserFeedAchievements(version, platform, username, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#fetchUserFeedAchievements");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *platform = platform_example; // Platform code (battle, bnet, uno, xbl, psn, steam)
String *username = username_example; // Player username (URL encoded)
String *locale = locale_example; // Locale for response

UserFeedApi *apiInstance = [[UserFeedApi alloc] init];

// Get user feed achievements (v1)
[apiInstance fetchUserFeedAchievementsWith:version
    platform:platform
    username:username
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.UserFeedApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var platform = platform_example; // {{String}} Platform code (battle, bnet, uno, xbl, psn, steam)
var username = username_example; // {{String}} Player username (URL encoded)
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchUserFeedAchievements(version, platform, username, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchUserFeedAchievementsExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new UserFeedApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var platform = platform_example;  // String | Platform code (battle, bnet, uno, xbl, psn, steam)
            var username = username_example;  // String | Player username (URL encoded)
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get user feed achievements (v1)
                ApiResponse result = apiInstance.fetchUserFeedAchievements(version, platform, username, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserFeedApi.fetchUserFeedAchievements: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiUserFeedApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$platform = platform_example; // String | Platform code (battle, bnet, uno, xbl, psn, steam)
$username = username_example; // String | Player username (URL encoded)
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchUserFeedAchievements($version, $platform, $username, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserFeedApi->fetchUserFeedAchievements: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserFeedApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::UserFeedApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $platform = platform_example; # String | Platform code (battle, bnet, uno, xbl, psn, steam)
my $username = username_example; # String | Player username (URL encoded)
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchUserFeedAchievements(version => $version, platform => $platform, username => $username, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserFeedApi->fetchUserFeedAchievements: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UserFeedApi()
version = version_example # String | API version (v1, v2, v3, v4)
platform = platform_example # String | Platform code (battle, bnet, uno, xbl, psn, steam)
username = username_example # String | Player username (URL encoded)
locale = locale_example # String | Locale for response

try: 
    # Get user feed achievements (v1)
    api_response = api_instance.fetch_user_feed_achievements(version, platform, username, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserFeedApi->fetchUserFeedAchievements: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
platform*
String
Platform code (battle, bnet, uno, xbl, psn, steam)
Required
username*
String
Player username (URL encoded)
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


fetchUserFriendFeed

Get user friend feed (v1)

Returns rendered friend feed. Default version: v1


/papi-client/userfeed/{version}/friendFeed/rendered/{locale}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/userfeed/{version}/friendFeed/rendered/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserFeedApi;

import java.io.File;
import java.util.*;

public class UserFeedApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchUserFriendFeed(version, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#fetchUserFriendFeed");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserFeedApi;

public class UserFeedApiExample {

    public static void main(String[] args) {
        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.fetchUserFriendFeed(version, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#fetchUserFriendFeed");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *locale = locale_example; // Locale for response

UserFeedApi *apiInstance = [[UserFeedApi alloc] init];

// Get user friend feed (v1)
[apiInstance fetchUserFriendFeedWith:version
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.UserFeedApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fetchUserFriendFeed(version, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fetchUserFriendFeedExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new UserFeedApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Get user friend feed (v1)
                ApiResponse result = apiInstance.fetchUserFriendFeed(version, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserFeedApi.fetchUserFriendFeed: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiUserFeedApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->fetchUserFriendFeed($version, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserFeedApi->fetchUserFriendFeed: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserFeedApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::UserFeedApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->fetchUserFriendFeed(version => $version, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserFeedApi->fetchUserFriendFeed: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UserFeedApi()
version = version_example # String | API version (v1, v2, v3, v4)
locale = locale_example # String | Locale for response

try: 
    # Get user friend feed (v1)
    api_response = api_instance.fetch_user_friend_feed(version, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserFeedApi->fetchUserFriendFeed: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendUserFeedPinStatus

Set user feed pin status (v1)

Set pin status for user feed items. Default version: v1


/papi-client/userfeed/{version}/favorite/set/{slot}/{locale}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/userfeed/{version}/favorite/set/{slot}/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserFeedApi;

import java.io.File;
import java.util.*;

public class UserFeedApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String slot = slot_example; // String | Loadout slot identifier
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.sendUserFeedPinStatus(version, slot, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#sendUserFeedPinStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserFeedApi;

public class UserFeedApiExample {

    public static void main(String[] args) {
        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String slot = slot_example; // String | Loadout slot identifier
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.sendUserFeedPinStatus(version, slot, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#sendUserFeedPinStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *slot = slot_example; // Loadout slot identifier
String *locale = locale_example; // Locale for response

UserFeedApi *apiInstance = [[UserFeedApi alloc] init];

// Set user feed pin status (v1)
[apiInstance sendUserFeedPinStatusWith:version
    slot:slot
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.UserFeedApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var slot = slot_example; // {{String}} Loadout slot identifier
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendUserFeedPinStatus(version, slot, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendUserFeedPinStatusExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new UserFeedApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var slot = slot_example;  // String | Loadout slot identifier
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Set user feed pin status (v1)
                ApiResponse result = apiInstance.sendUserFeedPinStatus(version, slot, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserFeedApi.sendUserFeedPinStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiUserFeedApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$slot = slot_example; // String | Loadout slot identifier
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->sendUserFeedPinStatus($version, $slot, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserFeedApi->sendUserFeedPinStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserFeedApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::UserFeedApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $slot = slot_example; # String | Loadout slot identifier
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->sendUserFeedPinStatus(version => $version, slot => $slot, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserFeedApi->sendUserFeedPinStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UserFeedApi()
version = version_example # String | API version (v1, v2, v3, v4)
slot = slot_example # String | Loadout slot identifier
locale = locale_example # String | Locale for response

try: 
    # Set user feed pin status (v1)
    api_response = api_instance.send_user_feed_pin_status(version, slot, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserFeedApi->sendUserFeedPinStatus: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
slot*
String
Loadout slot identifier
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendUserFriendFeedEntry

Send user friend feed entry (v1)

Send an entry to friend feed. Default version: v1


/papi-client/userfeed/{version}/friendFeed/details/{locale}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/userfeed/{version}/friendFeed/details/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserFeedApi;

import java.io.File;
import java.util.*;

public class UserFeedApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.sendUserFriendFeedEntry(version, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#sendUserFriendFeedEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserFeedApi;

public class UserFeedApiExample {

    public static void main(String[] args) {
        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.sendUserFriendFeedEntry(version, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#sendUserFriendFeedEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *locale = locale_example; // Locale for response

UserFeedApi *apiInstance = [[UserFeedApi alloc] init];

// Send user friend feed entry (v1)
[apiInstance sendUserFriendFeedEntryWith:version
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.UserFeedApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendUserFriendFeedEntry(version, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendUserFriendFeedEntryExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new UserFeedApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Send user friend feed entry (v1)
                ApiResponse result = apiInstance.sendUserFriendFeedEntry(version, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserFeedApi.sendUserFriendFeedEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiUserFeedApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->sendUserFriendFeedEntry($version, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserFeedApi->sendUserFriendFeedEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserFeedApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::UserFeedApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->sendUserFriendFeedEntry(version => $version, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserFeedApi->sendUserFriendFeedEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UserFeedApi()
version = version_example # String | API version (v1, v2, v3, v4)
locale = locale_example # String | Locale for response

try: 
    # Send user friend feed entry (v1)
    api_response = api_instance.send_user_friend_feed_entry(version, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserFeedApi->sendUserFriendFeedEntry: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error


sendUserFriendFeedReaction

Send user friend feed reaction (v1)

Send a reaction to friend feed. Default version: v1


/papi-client/userfeed/{version}/reactions/set/{reaction}/{locale}

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json,text/html"\
"https://callofduty.com/api/papi-client/userfeed/{version}/reactions/set/{reaction}/{locale}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserFeedApi;

import java.io.File;
import java.util.*;

public class UserFeedApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: cookieAuth
        ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
        cookieAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //cookieAuth.setApiKeyPrefix("Token");

        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String reaction = reaction_example; // String | Reaction type for user feed
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.sendUserFriendFeedReaction(version, reaction, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#sendUserFriendFeedReaction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserFeedApi;

public class UserFeedApiExample {

    public static void main(String[] args) {
        UserFeedApi apiInstance = new UserFeedApi();
        String version = version_example; // String | API version (v1, v2, v3, v4)
        String reaction = reaction_example; // String | Reaction type for user feed
        String locale = locale_example; // String | Locale for response
        try {
            ApiResponse result = apiInstance.sendUserFriendFeedReaction(version, reaction, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserFeedApi#sendUserFriendFeedReaction");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"ACT_SSO_COOKIE"];
String *version = version_example; // API version (v1, v2, v3, v4)
String *reaction = reaction_example; // Reaction type for user feed
String *locale = locale_example; // Locale for response

UserFeedApi *apiInstance = [[UserFeedApi alloc] init];

// Send user friend feed reaction (v1)
[apiInstance sendUserFriendFeedReactionWith:version
    reaction:reaction
    locale:locale
              completionHandler: ^(ApiResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CallOfDutyApi = require('call_of_duty_api');
var defaultClient = CallOfDutyApi.ApiClient.instance;

// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['ACT_SSO_COOKIE'] = "Token"

var api = new CallOfDutyApi.UserFeedApi()
var version = version_example; // {{String}} API version (v1, v2, v3, v4)
var reaction = reaction_example; // {{String}} Reaction type for user feed
var locale = locale_example; // {{String}} Locale for response

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sendUserFriendFeedReaction(version, reaction, locale, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sendUserFriendFeedReactionExample
    {
        public void main()
        {

            // Configure API key authorization: cookieAuth
            Configuration.Default.ApiKey.Add("ACT_SSO_COOKIE", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("ACT_SSO_COOKIE", "Bearer");

            var apiInstance = new UserFeedApi();
            var version = version_example;  // String | API version (v1, v2, v3, v4)
            var reaction = reaction_example;  // String | Reaction type for user feed
            var locale = locale_example;  // String | Locale for response

            try
            {
                // Send user friend feed reaction (v1)
                ApiResponse result = apiInstance.sendUserFriendFeedReaction(version, reaction, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserFeedApi.sendUserFriendFeedReaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('ACT_SSO_COOKIE', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('ACT_SSO_COOKIE', 'Bearer');

$api_instance = new Swagger\Client\ApiUserFeedApi();
$version = version_example; // String | API version (v1, v2, v3, v4)
$reaction = reaction_example; // String | Reaction type for user feed
$locale = locale_example; // String | Locale for response

try {
    $result = $api_instance->sendUserFriendFeedReaction($version, $reaction, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserFeedApi->sendUserFriendFeedReaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserFeedApi;

# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'ACT_SSO_COOKIE'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'ACT_SSO_COOKIE'} = "Bearer";

my $api_instance = WWW::SwaggerClient::UserFeedApi->new();
my $version = version_example; # String | API version (v1, v2, v3, v4)
my $reaction = reaction_example; # String | Reaction type for user feed
my $locale = locale_example; # String | Locale for response

eval { 
    my $result = $api_instance->sendUserFriendFeedReaction(version => $version, reaction => $reaction, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserFeedApi->sendUserFriendFeedReaction: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['ACT_SSO_COOKIE'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['ACT_SSO_COOKIE'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UserFeedApi()
version = version_example # String | API version (v1, v2, v3, v4)
reaction = reaction_example # String | Reaction type for user feed
locale = locale_example # String | Locale for response

try: 
    # Send user friend feed reaction (v1)
    api_response = api_instance.send_user_friend_feed_reaction(version, reaction, locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserFeedApi->sendUserFriendFeedReaction: %s\n" % e)

Parameters

Path parameters
Name Description
version*
String
API version (v1, v2, v3, v4)
Required
reaction*
String
Reaction type for user feed
Required
locale*
String
Locale for response
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response

Status: 401 - Authentication required

Status: 500 - Internal server error