boxcla: Verified that @mattwiller has signed the CLA. Thanks for the pull request!
coveralls: ## Pull Request Test Coverage Report for [Build 1093](https://coveralls.io/builds/19377329)

* **3** of **3**   **(100.0%)**  changed or added relevant lines in **2** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.005%**) to **94.528%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/19377329/badge)](https://coveralls.io/builds/19377329) |
| :-- | --: |
| Change from base [Build 1084](https://coveralls.io/builds/19316485): |  0.005% |
| Covered Lines: | 2073 |
| Relevant Lines: | 2193 |

---
##### 💛  - [Coveralls](https://coveralls.io)

diff --git a/boxsdk/config.py b/boxsdk/config.py
index 203cfc2..371117d 100644
--- a/boxsdk/config.py
+++ b/boxsdk/config.py
@@ -2,6 +2,8 @@
 
 from __future__ import unicode_literals, absolute_import
 
+from sys import version_info as py_version
+
 from . import version
 
 
@@ -17,3 +19,9 @@ class Client(object):
     """Configuration object containing the user agent string."""
     VERSION = version.__version__
     USER_AGENT_STRING = 'box-python-sdk-{0}'.format(VERSION)
+    BOX_UA_STRING = 'agent=box-python-sdk/{0}; env=python/{1}.{2}.{3}'.format(
+        VERSION,
+        py_version.major,
+        py_version.minor,
+        py_version.micro,
+    )
diff --git a/boxsdk/session/session.py b/boxsdk/session/session.py
index e9c0b14..d8a41ba 100644
--- a/boxsdk/session/session.py
+++ b/boxsdk/session/session.py
@@ -64,7 +64,10 @@ def __init__(
         self._client_config = client_config or Client()
         super(Session, self).__init__()
         self._network_layer = network_layer or DefaultNetwork()
-        self._default_headers = {'User-Agent': self._client_config.USER_AGENT_STRING}
+        self._default_headers = {
+            'User-Agent': self._client_config.USER_AGENT_STRING,
+            'X-Box-UA': self._client_config.BOX_UA_STRING,
+        }
         self._translator = translator
         self._default_network_request_kwargs = {}
         if default_headers:

Add Box SDK headers to API calls
We should definitely send headers for SDK name and SDK version. Other nice-to-haves to consider:

- Python version
- Requests version
diff --git a/test/integration/test_as_user.py b/test/integration/test_as_user.py
index 45cff68..372de7d 100644
--- a/test/integration/test_as_user.py
+++ b/test/integration/test_as_user.py
@@ -14,6 +14,7 @@ def as_user_headers(mock_user_id, access_token):
         'Authorization': 'Bearer {0}'.format(access_token),
         'As-User': mock_user_id,
         'User-Agent': Client.USER_AGENT_STRING,
+        'X-Box-UA': Client.BOX_UA_STRING,
     }
 
 
diff --git a/test/integration/test_retry_and_refresh.py b/test/integration/test_retry_and_refresh.py
index 057ed43..f27858c 100644
--- a/test/integration/test_retry_and_refresh.py
+++ b/test/integration/test_retry_and_refresh.py
@@ -29,7 +29,7 @@ def test_automatic_refresh(
             'POST',
             '{0}/token'.format(API.OAUTH2_API_URL),
             data=ANY,
-            headers={'content-type': 'application/x-www-form-urlencoded', 'User-Agent': ANY},
+            headers={'content-type': 'application/x-www-form-urlencoded', 'User-Agent': ANY, 'X-Box-UA': ANY},
         ),
         call(
             'GET',
diff --git a/test/integration/test_with_shared_link.py b/test/integration/test_with_shared_link.py
index c4a74d9..6d2af45 100644
--- a/test/integration/test_with_shared_link.py
+++ b/test/integration/test_with_shared_link.py
@@ -26,6 +26,7 @@ def box_api_headers(shared_link, shared_link_password, access_token):
         'Authorization': 'Bearer {0}'.format(access_token),
         'BoxApi': box_api_header,
         'User-Agent': Client.USER_AGENT_STRING,
+        'X-Box-UA': Client.BOX_UA_STRING,
     }
 
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-xdist mock sqlalchemy bottle jsonpatch
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
bottle==0.13.2
-e git+https://github.com/box/box-python-sdk.git@567ea528c8e757fe77399b21a68ccfc94341b68b#egg=boxsdk
certifi==2025.1.31
charset-normalizer==3.4.1
exceptiongroup==1.2.2
execnet==2.1.1
greenlet==3.1.1
idna==3.10
iniconfig==2.1.0
jsonpatch==1.33
jsonpointer==3.0.0
mock==5.2.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
pytest-xdist==3.6.1
requests==2.32.3
requests-toolbelt==1.0.0
six==1.17.0
SQLAlchemy==2.0.40
tomli==2.2.1
typing_extensions==4.13.0
urllib3==2.3.0
wrapt==1.17.2

name: box-python-sdk
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - bottle==0.13.2
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - greenlet==3.1.1
      - idna==3.10
      - iniconfig==2.1.0
      - jsonpatch==1.33
      - jsonpointer==3.0.0
      - mock==5.2.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - pytest-xdist==3.6.1
      - requests==2.32.3
      - requests-toolbelt==1.0.0
      - six==1.17.0
      - sqlalchemy==2.0.40
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - wrapt==1.17.2
prefix: /opt/conda/envs/box-python-sdk

test/integration/test_as_user.py::test_client_as_user_causes_as_user_header_to_be_added test/integration/test_as_user.py::test_folder_object_as_user_causes_as_user_header_to_be_added test/integration/test_as_user.py::test_group_membership_object_as_user_causes_as_user_header_to_be_added test/integration/test_as_user.py::test_events_endpoint_as_user_causes_as_user_header_to_be_added test/integration/test_as_user.py::test_metadata_endpoint_as_user_causes_as_user_header_to_be_added test/integration/test_retry_and_refresh.py::test_automatic_refresh test/integration/test_with_shared_link.py::test_client_with_shared_link_causes_box_api_header_to_be_added[None] test/integration/test_with_shared_link.py::test_client_with_shared_link_causes_box_api_header_to_be_added[shared_link_password] test/integration/test_with_shared_link.py::test_folder_object_with_shared_link_causes_box_api_header_to_be_added[None] test/integration/test_with_shared_link.py::test_folder_object_with_shared_link_causes_box_api_header_to_be_added[shared_link_password] test/integration/test_with_shared_link.py::test_group_membership_object_with_shared_link_causes_box_api_header_to_be_added[None] test/integration/test_with_shared_link.py::test_group_membership_object_with_shared_link_causes_box_api_header_to_be_added[shared_link_password] test/integration/test_with_shared_link.py::test_events_endpoint_with_shared_link_causes_box_api_header_to_be_added[None] test/integration/test_with_shared_link.py::test_events_endpoint_with_shared_link_causes_box_api_header_to_be_added[shared_link_password] test/integration/test_with_shared_link.py::test_metadata_endpoint_with_shared_link_causes_box_api_header_to_be_added[None] test/integration/test_with_shared_link.py::test_metadata_endpoint_with_shared_link_causes_box_api_header_to_be_added[shared_link_password]
boxsdk/config.py boxsdk/session/session.py
boxsdk/config.py boxsdk/session/session.py