Token: (403) Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Date': 'Mon, 06 Jan 2025

what is the solution in this case any one can suggest me for bellow error
token: (403) Reason: Forbidden HTTP response headers: HTTPHeaderDict({‘Date’: ‘Mon, 06 Jan 2025 20:19:33 GMT’, ‘Content-Type’: 'text/html
‘Connection’: ‘keep-alive’, ‘X-Frame-Options’: ‘SAMEORIGIN’, ‘Referrer-Policy’: ‘same-origin’, ‘Cache-Con
n 2025 20:19:48 GMT’, ‘Set-Cookie’: ‘__cf_bm=9xtvEaZzCwECT52M720kIw1l0NEiwfMwYa4V3csd34g-1736194773-1.0.1.
Gns61DXQHl1kveWuTlwGFEr; path=/; expires=Mon, 06-Jan-25 20:49:33 GMT; domain=.upstox.com; HttpOnly; Secure
5zdU1qQwgvcytCAoSUuH7.hac-1736194773523-0.0.1.1-604800000; path=/; domain=.upstox.com; HttpOnly; Secure; S
Strict-Transport-Security’: ‘max-age=0; includeSubDomains’, ‘Server’: ‘cloudflare’, ‘CF-RAY’: '8fde67567cb
‘})
HTTP response body: b’\n\n\n\nAttention Required! | Cloudflare\n<meta
ent-Type" content=“text/html; charset=UTF-8” />\n\n
low" />\n\n<link rel=“stylesheet” id=
rors.css" />\n\n\n if (!navigator.cookieEnabled) {\n w
, function () {\n var cookieEl = document.getElementById('cookie-alert');\n cookieEl.style.dis

\n\n\n\n\n
\n
\n

Sorry, you have been blocked


data-translate=“unable_to_access”>You are unable to access upstox.com\n
\n\n
\n
ooter-item sm:block sm:mb-1">Cloudflare Ray ID: 8fde67567cb747bc</s
sm:hidden">•\n
n" id=“cf-footer-ip-reveal” class=“cf-footer-ip-reveal-btn”>Click to reveal\n <span class="h
pan>\n \n
\n <span class="cf-fo
ce & security by <a rel=“noopener noreferrer” href="https://www.cloudflare.com/5xx-error-landin
re\n \n

\n (function(){function d(){var b=a.getElementById(“cf-footer-item-ip”
;b&&“classList"in b&&(b.classList.remove(“hidden”),c.addEventListener(“click”,function(){c.classList.add(”
lassList.remove(“hidden”)}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoade
ter → \n\n\n
\n
\n\n \n window.
n\n\n’

Traceback (most recent call last):
File “e:\Stock Market\Software\UpstoxALGO\UpstoxAlgo\test\sanity_test.py”, line 372, in
main()
~~~~^^
File “e:\Stock Market\Software\UpstoxALGO\UpstoxAlgo\test\sanity_test.py”, line 207, in main
profile = get_profile(api_version, configuration)
File “e:\Stock Market\Software\UpstoxALGO\UpstoxAlgo\test\sanity_test.py”, line 22, in get_profile
api_response = api_instance.get_profile(api_version)
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api\user_api.
(data) = self.get_profile_with_http_info(api_version, **kwargs) # noqa: E501
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api\user_api.
o
return self.api_client.call_api(
~~~~~~~~~~~~~~~~~~~~~~~~^
‘/v2/user/profile’, ‘GET’,
^^^^^^^^^^^^^^^^^^^^^^^^^^
…<11 lines>…
_request_timeout=params.get(‘_request_timeout’),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
collection_formats=collection_formats)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py
return self.__call_api(resource_path, method,
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
path_params, query_params, header_params,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…<2 lines>…
_return_http_data_only, collection_formats,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_preload_content, _request_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py
self.update_params_for_auth(header_params, query_params, auth_settings)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.pyte_params_for_a

self.update_params_for_auth(header_params, query_params, auth_settings)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py update_par
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py update_p
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py updat
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py02, in upda
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py 502, in
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.pye 502
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.pye 5
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.pye auth_setting = self.configuration.auth_settings().get(auth)
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.pylin
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.pyl auth_setting = self.configuration.auth_settings().get(auth)
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py,
line 502, in update_params_for_auth
File “E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py”
File "E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.pny auth_setting = self.configuration.auth_settings().get(auth)
File “E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\api_client.py”
", line 502, in update_params_for_auth
auth_setting = self.configuration.auth_settings().get(auth)
~~~~~~~~~~~~~~~~~~~~~~~~^^
File “E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo.venv\Lib\site-packages\upstox_client\configuration.
.py”, line 243, in auth_settings
‘value’: 'Bearer ’ + self.access_token
^

TypeError: can only concatenate str (not “NoneType”) to str
PS E:\Stock Market\Software\UpstoxALGO\UpstoxAlgo>

and file name sanity_test.py

and file code is

from future import print_function