Repository: codemagic-ci-cd/cli-tools (language: python)

Issue:
Feature: Add option to retry unauthorized App Store Connect requests
Sometimes App Store Connect API yields false positive results with regards to authentication. More precisely, requests signed with JSON web tokens that are generated from completely valid API keys can result in a response with status code `401` and content
```
Authentication credentials are missing or invalid. - Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens
```

To mitigate this issue to some degree, add option to gracefully retry requests that failed with status code 401.

**Affected actions:**
- All actions and subactions in `app-store-connect`.

**For example:**
```shell
$ app-store-connect fetch-signing-files io.example.app \
    --issuer-id 'Invalid API key issuer ID' \
    --api-unauthorized-retries 2 \
    --log-api-calls
>>> GET https://api.appstoreconnect.apple.com/v1/bundleIds {'limit': 100, 'sort': 'name', 'filter[identifier]': 'io.example.app', 'filter[platform]': 'IOS'}
<<< 401 {'errors': [{'status': '401', 'code': 'NOT_AUTHORIZED', 'title': 'Authentication credentials are missing or invalid.', 'detail': 'Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens'}]}
Request failed due to authentication failure on attempt #1, try again
>>> GET https://api.appstoreconnect.apple.com/v1/bundleIds {'limit': 100, 'sort': 'name', 'filter[identifier]': 'io.example.app', 'filter[platform]': 'IOS'}
<<< 401 {'errors': [{'status': '401', 'code': 'NOT_AUTHORIZED', 'title': 'Authentication credentials are missing or invalid.', 'detail': 'Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens'}]}
Unauthorized request retries are exhausted with 2 attempts, stop trying
GET https://api.appstoreconnect.apple.com/v1/bundleIds?limit=100&sort=name&filter%5Bidentifier%5D=io.example.app&filter%5Bplatform%5D=IOS returned 401: Authentication credentials are missing or invalid. - Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens
``` 

Docs related to the changes made here are in a separate PR #179.


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7b7e64d8..78544b7c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ Version 0.15.0
 - `AppStoreConnect` and `AppStoreConnectApiClient` classes take new optional keyword argument `enable_jwt_cache` which configures whether the JSON web token is cached to file or not. [PR #181](https://github.com/codemagic-ci-cd/cli-tools/pull/181)
 
 **Docs**
+- Update docs for `app-store-connect` actions and include information about `--api-unauthorized-retries` option. [PR #179](https://github.com/codemagic-ci-cd/cli-tools/pull/179)
 - Update docs for `app-store-connect` actions and include information about `--disable-jwt-cache` option. [PR #183](https://github.com/codemagic-ci-cd/cli-tools/pull/183)
 
 Version 0.14.1
diff --git a/docs/app-store-connect/README.md b/docs/app-store-connect/README.md
index 5ba45119..637909ec 100644
--- a/docs/app-store-connect/README.md
+++ b/docs/app-store-connect/README.md
@@ -8,6 +8,7 @@ app-store-connect
 ```bash
 app-store-connect [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-version-localizations.md b/docs/app-store-connect/app-store-version-localizations.md
index 35c7cbce..955753fd 100644
--- a/docs/app-store-connect/app-store-version-localizations.md
+++ b/docs/app-store-connect/app-store-version-localizations.md
@@ -8,6 +8,7 @@ app-store-version-localizations
 ```bash
 app-store-connect app-store-version-localizations [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect app-store-version-localizations [-h] [--log-stream STREAM] [--
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-version-localizations/create.md b/docs/app-store-connect/app-store-version-localizations/create.md
index 03eb564b..9c64eb32 100644
--- a/docs/app-store-connect/app-store-version-localizations/create.md
+++ b/docs/app-store-connect/app-store-version-localizations/create.md
@@ -8,6 +8,7 @@ create
 ```bash
 app-store-connect app-store-version-localizations create [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -66,6 +67,10 @@ Describe what's new in this version of your app, such as new features, improveme
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-version-localizations/delete.md b/docs/app-store-connect/app-store-version-localizations/delete.md
index b9c4df31..070be603 100644
--- a/docs/app-store-connect/app-store-version-localizations/delete.md
+++ b/docs/app-store-connect/app-store-version-localizations/delete.md
@@ -8,6 +8,7 @@ delete
 ```bash
 app-store-connect app-store-version-localizations delete [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Do not raise exceptions if the specified resource does not exist.
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-version-localizations/get.md b/docs/app-store-connect/app-store-version-localizations/get.md
index b434f6a1..fa8e9b45 100644
--- a/docs/app-store-connect/app-store-version-localizations/get.md
+++ b/docs/app-store-connect/app-store-version-localizations/get.md
@@ -8,6 +8,7 @@ get
 ```bash
 app-store-connect app-store-version-localizations get [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ UUID value of the App Store Version localization
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-version-localizations/modify.md b/docs/app-store-connect/app-store-version-localizations/modify.md
index ee1713a2..506d21bc 100644
--- a/docs/app-store-connect/app-store-version-localizations/modify.md
+++ b/docs/app-store-connect/app-store-version-localizations/modify.md
@@ -8,6 +8,7 @@ modify
 ```bash
 app-store-connect app-store-version-localizations modify [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -61,6 +62,10 @@ Describe what's new in this version of your app, such as new features, improveme
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-version-submissions.md b/docs/app-store-connect/app-store-version-submissions.md
index b75cd95c..e46b64d7 100644
--- a/docs/app-store-connect/app-store-version-submissions.md
+++ b/docs/app-store-connect/app-store-version-submissions.md
@@ -8,6 +8,7 @@ app-store-version-submissions
 ```bash
 app-store-connect app-store-version-submissions [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect app-store-version-submissions [-h] [--log-stream STREAM] [--no
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-version-submissions/create.md b/docs/app-store-connect/app-store-version-submissions/create.md
index 402f272a..786e7289 100644
--- a/docs/app-store-connect/app-store-version-submissions/create.md
+++ b/docs/app-store-connect/app-store-version-submissions/create.md
@@ -8,6 +8,7 @@ create
 ```bash
 app-store-connect app-store-version-submissions create [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ UUID value of the App Store Version
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-version-submissions/delete.md b/docs/app-store-connect/app-store-version-submissions/delete.md
index 6ed7f7cf..a331fe6d 100644
--- a/docs/app-store-connect/app-store-version-submissions/delete.md
+++ b/docs/app-store-connect/app-store-version-submissions/delete.md
@@ -8,6 +8,7 @@ delete
 ```bash
 app-store-connect app-store-version-submissions delete [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Do not raise exceptions if the specified resource does not exist.
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-versions.md b/docs/app-store-connect/app-store-versions.md
index 5a2158f3..61cbc85c 100644
--- a/docs/app-store-connect/app-store-versions.md
+++ b/docs/app-store-connect/app-store-versions.md
@@ -8,6 +8,7 @@ app-store-versions
 ```bash
 app-store-connect app-store-versions [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect app-store-versions [-h] [--log-stream STREAM] [--no-color] [--
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-versions/create.md b/docs/app-store-connect/app-store-versions/create.md
index b47de38f..b577ac6f 100644
--- a/docs/app-store-connect/app-store-versions/create.md
+++ b/docs/app-store-connect/app-store-versions/create.md
@@ -8,6 +8,7 @@ create
 ```bash
 app-store-connect app-store-versions create [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -56,6 +57,10 @@ Apple operating systems
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-versions/delete.md b/docs/app-store-connect/app-store-versions/delete.md
index 74630265..1d583321 100644
--- a/docs/app-store-connect/app-store-versions/delete.md
+++ b/docs/app-store-connect/app-store-versions/delete.md
@@ -8,6 +8,7 @@ delete
 ```bash
 app-store-connect app-store-versions delete [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Do not raise exceptions if the specified resource does not exist.
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-versions/localizations.md b/docs/app-store-connect/app-store-versions/localizations.md
index 97c09214..ee23c62d 100644
--- a/docs/app-store-connect/app-store-versions/localizations.md
+++ b/docs/app-store-connect/app-store-versions/localizations.md
@@ -8,6 +8,7 @@ localizations
 ```bash
 app-store-connect app-store-versions localizations [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ UUID value of the App Store Version
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/app-store-versions/modify.md b/docs/app-store-connect/app-store-versions/modify.md
index 59905440..a944718b 100644
--- a/docs/app-store-connect/app-store-versions/modify.md
+++ b/docs/app-store-connect/app-store-versions/modify.md
@@ -8,6 +8,7 @@ modify
 ```bash
 app-store-connect app-store-versions modify [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -56,6 +57,10 @@ Version of the build published to App Store that identifies an iteration of the
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/apps.md b/docs/app-store-connect/apps.md
index 23fa3815..ec451b06 100644
--- a/docs/app-store-connect/apps.md
+++ b/docs/app-store-connect/apps.md
@@ -8,6 +8,7 @@ apps
 ```bash
 app-store-connect apps [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect apps [-h] [--log-stream STREAM] [--no-color] [--version] [-s]
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/apps/app-store-versions.md b/docs/app-store-connect/apps/app-store-versions.md
index 846ae585..7f2842a7 100644
--- a/docs/app-store-connect/apps/app-store-versions.md
+++ b/docs/app-store-connect/apps/app-store-versions.md
@@ -8,6 +8,7 @@ app-store-versions
 ```bash
 app-store-connect apps app-store-versions [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -51,6 +52,10 @@ State of App Store Version
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/apps/builds.md b/docs/app-store-connect/apps/builds.md
index 8498dbdd..463d97c3 100644
--- a/docs/app-store-connect/apps/builds.md
+++ b/docs/app-store-connect/apps/builds.md
@@ -8,6 +8,7 @@ builds
 ```bash
 app-store-connect apps builds [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -61,6 +62,10 @@ Build processing state
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/apps/get.md b/docs/app-store-connect/apps/get.md
index 4ccfbc18..0b9d565a 100644
--- a/docs/app-store-connect/apps/get.md
+++ b/docs/app-store-connect/apps/get.md
@@ -8,6 +8,7 @@ get
 ```bash
 app-store-connect apps get [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Application Apple ID. An automatically generated ID assigned to your app
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/apps/list.md b/docs/app-store-connect/apps/list.md
index 80414546..841afba1 100644
--- a/docs/app-store-connect/apps/list.md
+++ b/docs/app-store-connect/apps/list.md
@@ -8,6 +8,7 @@ list
 ```bash
 app-store-connect apps list [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -64,6 +65,10 @@ State of App Store Version
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/apps/pre-release-versions.md b/docs/app-store-connect/apps/pre-release-versions.md
index c2bcd6f7..13a3aabc 100644
--- a/docs/app-store-connect/apps/pre-release-versions.md
+++ b/docs/app-store-connect/apps/pre-release-versions.md
@@ -8,6 +8,7 @@ pre-release-versions
 ```bash
 app-store-connect apps pre-release-versions [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Application Apple ID. An automatically generated ID assigned to your app
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-app-review-submissions.md b/docs/app-store-connect/beta-app-review-submissions.md
index f1453cb3..5bc4940f 100644
--- a/docs/app-store-connect/beta-app-review-submissions.md
+++ b/docs/app-store-connect/beta-app-review-submissions.md
@@ -8,6 +8,7 @@ beta-app-review-submissions
 ```bash
 app-store-connect beta-app-review-submissions [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect beta-app-review-submissions [-h] [--log-stream STREAM] [--no-c
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-app-review-submissions/create.md b/docs/app-store-connect/beta-app-review-submissions/create.md
index 2d46dc74..92c1b479 100644
--- a/docs/app-store-connect/beta-app-review-submissions/create.md
+++ b/docs/app-store-connect/beta-app-review-submissions/create.md
@@ -8,6 +8,7 @@ create
 ```bash
 app-store-connect beta-app-review-submissions create [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Alphanumeric ID value of the Build
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-app-review-submissions/list.md b/docs/app-store-connect/beta-app-review-submissions/list.md
index cfb3c4c8..7b273342 100644
--- a/docs/app-store-connect/beta-app-review-submissions/list.md
+++ b/docs/app-store-connect/beta-app-review-submissions/list.md
@@ -8,6 +8,7 @@ list
 ```bash
 app-store-connect beta-app-review-submissions list [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Alphanumeric ID value of the Build
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-build-localizations.md b/docs/app-store-connect/beta-build-localizations.md
index 2481524d..9f00b772 100644
--- a/docs/app-store-connect/beta-build-localizations.md
+++ b/docs/app-store-connect/beta-build-localizations.md
@@ -8,6 +8,7 @@ beta-build-localizations
 ```bash
 app-store-connect beta-build-localizations [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect beta-build-localizations [-h] [--log-stream STREAM] [--no-colo
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-build-localizations/create.md b/docs/app-store-connect/beta-build-localizations/create.md
index e3e8c607..c188588a 100644
--- a/docs/app-store-connect/beta-build-localizations/create.md
+++ b/docs/app-store-connect/beta-build-localizations/create.md
@@ -8,6 +8,7 @@ create
 ```bash
 app-store-connect beta-build-localizations create [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -41,6 +42,10 @@ Describe the changes and additions to the build and indicate the features you wo
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-build-localizations/delete.md b/docs/app-store-connect/beta-build-localizations/delete.md
index cebc4b74..00916b4a 100644
--- a/docs/app-store-connect/beta-build-localizations/delete.md
+++ b/docs/app-store-connect/beta-build-localizations/delete.md
@@ -8,6 +8,7 @@ delete
 ```bash
 app-store-connect beta-build-localizations delete [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Do not raise exceptions if the specified resource does not exist.
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-build-localizations/get.md b/docs/app-store-connect/beta-build-localizations/get.md
index 47fc19f8..a45ecf16 100644
--- a/docs/app-store-connect/beta-build-localizations/get.md
+++ b/docs/app-store-connect/beta-build-localizations/get.md
@@ -8,6 +8,7 @@ get
 ```bash
 app-store-connect beta-build-localizations get [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Alphanumeric ID value of the Beta Build Localization
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-build-localizations/list.md b/docs/app-store-connect/beta-build-localizations/list.md
index b04ff284..ad5e26a2 100644
--- a/docs/app-store-connect/beta-build-localizations/list.md
+++ b/docs/app-store-connect/beta-build-localizations/list.md
@@ -8,6 +8,7 @@ list
 ```bash
 app-store-connect beta-build-localizations list [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ The locale code name for displaying localized "What's new" content in TestFlight
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-build-localizations/modify.md b/docs/app-store-connect/beta-build-localizations/modify.md
index 77a2e89d..1ec66a3b 100644
--- a/docs/app-store-connect/beta-build-localizations/modify.md
+++ b/docs/app-store-connect/beta-build-localizations/modify.md
@@ -8,6 +8,7 @@ modify
 ```bash
 app-store-connect beta-build-localizations modify [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Describe the changes and additions to the build and indicate the features you wo
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-groups.md b/docs/app-store-connect/beta-groups.md
index 3e106e05..3f75fd24 100644
--- a/docs/app-store-connect/beta-groups.md
+++ b/docs/app-store-connect/beta-groups.md
@@ -8,6 +8,7 @@ beta-groups
 ```bash
 app-store-connect beta-groups [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect beta-groups [-h] [--log-stream STREAM] [--no-color] [--version
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-groups/add-build.md b/docs/app-store-connect/beta-groups/add-build.md
index 4e0e214c..a6ef4495 100644
--- a/docs/app-store-connect/beta-groups/add-build.md
+++ b/docs/app-store-connect/beta-groups/add-build.md
@@ -8,6 +8,7 @@ add-build
 ```bash
 app-store-connect beta-groups add-build [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -34,6 +35,10 @@ Name of your Beta group. Multiple arguments
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/beta-groups/remove-build.md b/docs/app-store-connect/beta-groups/remove-build.md
index 4723c51c..0af4db27 100644
--- a/docs/app-store-connect/beta-groups/remove-build.md
+++ b/docs/app-store-connect/beta-groups/remove-build.md
@@ -8,6 +8,7 @@ remove-build
 ```bash
 app-store-connect beta-groups remove-build [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -34,6 +35,10 @@ Name of your Beta group. Multiple arguments
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/builds.md b/docs/app-store-connect/builds.md
index 374422c3..d4fc210f 100644
--- a/docs/app-store-connect/builds.md
+++ b/docs/app-store-connect/builds.md
@@ -8,6 +8,7 @@ builds
 ```bash
 app-store-connect builds [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -23,6 +24,10 @@ app-store-connect builds [-h] [--log-stream STREAM] [--no-color] [--version] [-s
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/builds/app-store-version.md b/docs/app-store-connect/builds/app-store-version.md
index e83fcf57..b06ca14b 100644
--- a/docs/app-store-connect/builds/app-store-version.md
+++ b/docs/app-store-connect/builds/app-store-version.md
@@ -8,6 +8,7 @@ app-store-version
 ```bash
 app-store-connect builds app-store-version [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Alphanumeric ID value of the Build
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/builds/get.md b/docs/app-store-connect/builds/get.md
index e99d1458..dc47a801 100644
--- a/docs/app-store-connect/builds/get.md
+++ b/docs/app-store-connect/builds/get.md
@@ -8,6 +8,7 @@ get
 ```bash
 app-store-connect builds get [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Alphanumeric ID value of the Build
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/builds/pre-release-version.md b/docs/app-store-connect/builds/pre-release-version.md
index fe98eb19..9da9b657 100644
--- a/docs/app-store-connect/builds/pre-release-version.md
+++ b/docs/app-store-connect/builds/pre-release-version.md
@@ -8,6 +8,7 @@ pre-release-version
 ```bash
 app-store-connect builds pre-release-version [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Alphanumeric ID value of the Build
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/builds/submit-to-app-store.md b/docs/app-store-connect/builds/submit-to-app-store.md
index e4bb2cb8..333591f7 100644
--- a/docs/app-store-connect/builds/submit-to-app-store.md
+++ b/docs/app-store-connect/builds/submit-to-app-store.md
@@ -8,6 +8,7 @@ submit-to-app-store
 ```bash
 app-store-connect builds submit-to-app-store [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -106,6 +107,10 @@ Localized App Store version meta information for App Store version submission as
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/create-bundle-id.md b/docs/app-store-connect/create-bundle-id.md
index b09439f4..78253b61 100644
--- a/docs/app-store-connect/create-bundle-id.md
+++ b/docs/app-store-connect/create-bundle-id.md
@@ -8,6 +8,7 @@ create-bundle-id
 ```bash
 app-store-connect create-bundle-id [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -41,6 +42,10 @@ Bundle ID platform. Default:&nbsp;`IOS`
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/create-certificate.md b/docs/app-store-connect/create-certificate.md
index 017c3b14..8cb3d06e 100644
--- a/docs/app-store-connect/create-certificate.md
+++ b/docs/app-store-connect/create-certificate.md
@@ -8,6 +8,7 @@ create-certificate
 ```bash
 app-store-connect create-certificate [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -49,6 +50,10 @@ Whether to save the resources to disk. See PROFILES_DIRECTORY and CERTIFICATES_D
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/create-profile.md b/docs/app-store-connect/create-profile.md
index 750fd427..ad3815f4 100644
--- a/docs/app-store-connect/create-profile.md
+++ b/docs/app-store-connect/create-profile.md
@@ -8,6 +8,7 @@ create-profile
 ```bash
 app-store-connect create-profile [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -56,6 +57,10 @@ Whether to save the resources to disk. See PROFILES_DIRECTORY and CERTIFICATES_D
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/delete-bundle-id.md b/docs/app-store-connect/delete-bundle-id.md
index a72ea00e..31fa1664 100644
--- a/docs/app-store-connect/delete-bundle-id.md
+++ b/docs/app-store-connect/delete-bundle-id.md
@@ -8,6 +8,7 @@ delete-bundle-id
 ```bash
 app-store-connect delete-bundle-id [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Do not raise exceptions if the specified resource does not exist.
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/delete-certificate.md b/docs/app-store-connect/delete-certificate.md
index 10146db3..cab73cac 100644
--- a/docs/app-store-connect/delete-certificate.md
+++ b/docs/app-store-connect/delete-certificate.md
@@ -8,6 +8,7 @@ delete-certificate
 ```bash
 app-store-connect delete-certificate [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Do not raise exceptions if the specified resource does not exist.
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/delete-profile.md b/docs/app-store-connect/delete-profile.md
index 53783b2a..9c372146 100644
--- a/docs/app-store-connect/delete-profile.md
+++ b/docs/app-store-connect/delete-profile.md
@@ -8,6 +8,7 @@ delete-profile
 ```bash
 app-store-connect delete-profile [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Do not raise exceptions if the specified resource does not exist.
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/fetch-signing-files.md b/docs/app-store-connect/fetch-signing-files.md
index 5878fae9..6b8b0833 100644
--- a/docs/app-store-connect/fetch-signing-files.md
+++ b/docs/app-store-connect/fetch-signing-files.md
@@ -8,6 +8,7 @@ fetch-signing-files
 ```bash
 app-store-connect fetch-signing-files [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -66,6 +67,10 @@ Whether to create the resource if it does not exist yet
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/get-bundle-id.md b/docs/app-store-connect/get-bundle-id.md
index bfac9710..29cf5d39 100644
--- a/docs/app-store-connect/get-bundle-id.md
+++ b/docs/app-store-connect/get-bundle-id.md
@@ -8,6 +8,7 @@ get-bundle-id
 ```bash
 app-store-connect get-bundle-id [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -29,6 +30,10 @@ Alphanumeric ID value of the Bundle ID
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/get-certificate.md b/docs/app-store-connect/get-certificate.md
index 7f51c7fd..877d23f0 100644
--- a/docs/app-store-connect/get-certificate.md
+++ b/docs/app-store-connect/get-certificate.md
@@ -8,6 +8,7 @@ get-certificate
 ```bash
 app-store-connect get-certificate [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -51,6 +52,10 @@ Whether to save the resources to disk. See PROFILES_DIRECTORY and CERTIFICATES_D
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/get-profile.md b/docs/app-store-connect/get-profile.md
index 54e1fe78..a9170742 100644
--- a/docs/app-store-connect/get-profile.md
+++ b/docs/app-store-connect/get-profile.md
@@ -8,6 +8,7 @@ get-profile
 ```bash
 app-store-connect get-profile [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Whether to save the resources to disk. See PROFILES_DIRECTORY and CERTIFICATES_D
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/list-builds.md b/docs/app-store-connect/list-builds.md
index 0ae78a06..3b47beaf 100644
--- a/docs/app-store-connect/list-builds.md
+++ b/docs/app-store-connect/list-builds.md
@@ -8,6 +8,7 @@ list-builds
 ```bash
 app-store-connect list-builds [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -59,6 +60,10 @@ Build processing state
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/list-bundle-id-profiles.md b/docs/app-store-connect/list-bundle-id-profiles.md
index 1028bade..a8803bdf 100644
--- a/docs/app-store-connect/list-bundle-id-profiles.md
+++ b/docs/app-store-connect/list-bundle-id-profiles.md
@@ -8,6 +8,7 @@ list-bundle-id-profiles
 ```bash
 app-store-connect list-bundle-id-profiles [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -51,6 +52,10 @@ Whether to save the resources to disk. See PROFILES_DIRECTORY and CERTIFICATES_D
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/list-bundle-ids.md b/docs/app-store-connect/list-bundle-ids.md
index 16827390..9dfbca37 100644
--- a/docs/app-store-connect/list-bundle-ids.md
+++ b/docs/app-store-connect/list-bundle-ids.md
@@ -8,6 +8,7 @@ list-bundle-ids
 ```bash
 app-store-connect list-bundle-ids [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -44,6 +45,10 @@ Only match Bundle IDs that have exactly the same identifier specified by `BUNDLE
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/list-certificates.md b/docs/app-store-connect/list-certificates.md
index 3b89fdba..49ae607e 100644
--- a/docs/app-store-connect/list-certificates.md
+++ b/docs/app-store-connect/list-certificates.md
@@ -8,6 +8,7 @@ list-certificates
 ```bash
 app-store-connect list-certificates [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -59,6 +60,10 @@ Whether to save the resources to disk. See PROFILES_DIRECTORY and CERTIFICATES_D
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/list-devices.md b/docs/app-store-connect/list-devices.md
index d91387cf..c05e4f37 100644
--- a/docs/app-store-connect/list-devices.md
+++ b/docs/app-store-connect/list-devices.md
@@ -8,6 +8,7 @@ list-devices
 ```bash
 app-store-connect list-devices [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -39,6 +40,10 @@ Status of the Device
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/list-profiles.md b/docs/app-store-connect/list-profiles.md
index ab2449e7..747ffd24 100644
--- a/docs/app-store-connect/list-profiles.md
+++ b/docs/app-store-connect/list-profiles.md
@@ -8,6 +8,7 @@ list-profiles
 ```bash
 app-store-connect list-profiles [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -44,6 +45,10 @@ Whether to save the resources to disk. See PROFILES_DIRECTORY and CERTIFICATES_D
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/publish.md b/docs/app-store-connect/publish.md
index d4d7b151..010f71b8 100644
--- a/docs/app-store-connect/publish.md
+++ b/docs/app-store-connect/publish.md
@@ -8,6 +8,7 @@ publish
 ```bash
 app-store-connect publish [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -176,6 +177,10 @@ Show verbose log output when launching Application Loader tool. That is add `--v
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/register-device.md b/docs/app-store-connect/register-device.md
index 5151552a..611ab660 100644
--- a/docs/app-store-connect/register-device.md
+++ b/docs/app-store-connect/register-device.md
@@ -8,6 +8,7 @@ register-device
 ```bash
 app-store-connect register-device [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -41,6 +42,10 @@ Bundle ID platform. Default:&nbsp;`IOS`
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 


Test patch:
diff --git a/docs/app-store-connect/builds/add-beta-test-info.md b/docs/app-store-connect/builds/add-beta-test-info.md
index a61132a1..6d8df80a 100644
--- a/docs/app-store-connect/builds/add-beta-test-info.md
+++ b/docs/app-store-connect/builds/add-beta-test-info.md
@@ -8,6 +8,7 @@ add-beta-test-info
 ```bash
 app-store-connect builds add-beta-test-info [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -46,6 +47,10 @@ Describe the changes and additions to the build and indicate the features you wo
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/builds/submit-to-testflight.md b/docs/app-store-connect/builds/submit-to-testflight.md
index c1e0f472..67f525c9 100644
--- a/docs/app-store-connect/builds/submit-to-testflight.md
+++ b/docs/app-store-connect/builds/submit-to-testflight.md
@@ -8,6 +8,7 @@ submit-to-testflight
 ```bash
 app-store-connect builds submit-to-testflight [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -36,6 +37,10 @@ Maximum amount of minutes to wait for the freshly uploaded build to be processed
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/get-latest-app-store-build-number.md b/docs/app-store-connect/get-latest-app-store-build-number.md
index 4956dde1..9163bd19 100644
--- a/docs/app-store-connect/get-latest-app-store-build-number.md
+++ b/docs/app-store-connect/get-latest-app-store-build-number.md
@@ -8,6 +8,7 @@ get-latest-app-store-build-number
 ```bash
 app-store-connect get-latest-app-store-build-number [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -41,6 +42,10 @@ Apple operating systems
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`
 
 
diff --git a/docs/app-store-connect/get-latest-testflight-build-number.md b/docs/app-store-connect/get-latest-testflight-build-number.md
index e24cb8fd..1e00fdba 100644
--- a/docs/app-store-connect/get-latest-testflight-build-number.md
+++ b/docs/app-store-connect/get-latest-testflight-build-number.md
@@ -8,6 +8,7 @@ get-latest-testflight-build-number
 ```bash
 app-store-connect get-latest-testflight-build-number [-h] [--log-stream STREAM] [--no-color] [--version] [-s] [-v]
     [--log-api-calls]
+    [--api-unauthorized-retries UNAUTHORIZED_REQUEST_RETRIES]
     [--disable-jwt-cache]
     [--json]
     [--issuer-id ISSUER_ID]
@@ -41,6 +42,10 @@ Apple operating systems
 
 
 Turn on logging for App Store Connect API HTTP requests
+##### `--api-unauthorized-retries, -r=UNAUTHORIZED_REQUEST_RETRIES`
+
+
+Specify how many times the App Store Connect API request should be retried in case the called request fails due to an authentication error (401 Unauthorized response from the server). In case of the above authentication error, the request is retried usinga new JSON Web Token as many times until the number of retries is exhausted. If not given, the value will be checked from the environment variable `APP_STORE_CONNECT_API_UNAUTHORIZED_RETRIES`. [Default: 3]
 ##### `--disable-jwt-cache`