Skip to main content

XGameStreamingGetClientIPAddress

Deprecated. This API is deprecated as of the 2604 GDK release and will be removed in a future GDK release. On the current XBOX Cloud Gaming streaming stack, this API is non-functional and returns E_GAMESTREAMING_NO_DATA on success.If your title needs to determine whether it’s running on an XBOX Game Streaming server, or needs the user’s approximate geographic location, use XSTS token claims instead.
This API returns an IP address for the end user client device that is being used to stream content via the xbox game streaming service. This API and associated information should only be used when complying with Microsoft standard privacy guidelines with respect to informing end users of the information collection. If you have any questions or concerns regarding the compliant usage of this API reach out to your Microsoft representative.

Syntax

Parameters

client   _In_
Type: XGameStreamingClientId
The streaming client that is being queried. ipAddressSize   _In_
Type: size_t
The maximum size of the ipAddress buffer that is being provided. Typically the value of this should just be the ClientIPAddressMaxBytes. ipAddress   _Out_writes_z_(ipAddressSize)
Type: char*
The buffer that will be populated with the IP address of the specified client.

Return value

Type: HRESULT Returns S_OK if successful; otherwise, returns an error code.

Potential Errors

For a list of error codes, see Error Codes.

Remarks

The ipAddress can be either an IPv4 address (1.2.3.4) or an IPv6 address (1:2:3:4:5:6:7:8). ParseNetworkString can be used to parse the string if desired. The IP address returned is what the XBOX has received from the streaming client. If the streaming client is using a VPN or is behind a NAT then utilizing the IP address for geolocation may have issues.
Private IP addresses may be returned during development or remote play scenarios where the streaming client and the XBOX are on the same private network.

Example

Requirements

Header: xgamestreaming.h
Library: xgameruntime.lib
Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

XGameStreaming
Last modified on October 19, 2026