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
| 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
|
| Name | Description |
|---|