Hi.
I have the Case 0003817361 and the consutor to indicate that I must open one consult in the Community Developer. My case is:
I require chage the "instance" value in the trunk_outboundIdentity_callingAddress parameter for one Base Setting Trunk.
I use Python SDK an PUT put_telephony_providers_edges_trunkbasesetting API as follow:
__________________________________________________
import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Declaracion de oAuth
CLIENT_ID = 'XXXXX'
CLIENT_SECRET = 'XXXXX'
# Autenticación en la Organización
apiclient = PureCloudPlatformClientV2.api_client.ApiClient().get_client_credentials_token(CLIENT_ID, CLIENT_SECRET)
print("apiclient", apiclient)
# Create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(apiclient)
trunk_base_settings_id = 'aaaaaa'
# Create the body object
body = PureCloudPlatformClientV2.TrunkBase()
# Set the basic properties
body.name = 'Interaxa_Prueba_CambioCallerAddress'
body.trunk_type = 'EXTERNAL'
body.managed = False
# Set the trunkMetabase
body.trunk_metabase = {
'id': 'external_sip_pcv_byoc_carrier.json',
'name': 'Generic BYOC Carrier'
}
# Set the properties with the correct structure
body.properties = {
'trunk_outboundIdentity_callingAddress':
{'type': 'string',
'value': {'default': '','instance': '+5712345678'}}
}
try:
# Update a Trunk Base Settings object by ID
api_response = api_instance.put_telephony_providers_edges_trunkbasesetting(trunk_base_settings_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_trunkbasesetting: %s\n" % e)
--------------------------------------------------
BUT RESULT THE FOLLW ERROR:
apiclient <PureCloudPlatformClientV2.api_client.ApiClient object at 0x0000022702C6C200>
Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_trunkbasesetting: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Content-Length': '198', 'Connection': 'keep-alive', 'Date': 'Mon, 28 Jul 2025 16:19:21 GMT', 'ININ-Correlation-Id': '1e94e9b9-aba4-4fc8-a5de-7e767285c4d5', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 4410ff6f476bccd229a9ea9b3c8e1238.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'BOG50-P2', 'X-Amz-Cf-Id': '7lmgmJwS8uQ5OTQgqwGjqnnUXMxef_yOrquWysweJ8DclX6ojnouaQ=='})
HTTP response body: {"message":"The request could not be understood by the server due to malformed syntax.","code":"bad.request","status":400,"contextId":"1e94e9b9-aba4-4fc8-a5de-7e767285c4d5","details":[],"errors":[]}
Genesys Care in the case answers:
Thank you for the chat earlier. As discussed, the latest Python script shows a different error in the backend:
{"t":"2025-07-28T16:19:21.429Z","message":"Error code [bad.request] type [IllegalArgumentException] message [The template variable 'trunkBaseId' has no value] cause type [] cause message []","logger_name":"s.f.c.i.p.s.e.m.ApiExceptionMapper","thread_name":"redis-auth-context-continuation-54","level":"INFO","req_contentLength":"315","req_templateUri":"api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId}","req_xForwardedFor":"186.98.70.139, 130.176.191.137","oauthClientId":"abac7aee-78c4-4e26-8e4d-38eaf605fa13","out_requestComplete":"167","oauthClientOrgId":"9bb35534-a7d5-45db-b818-dab73775234a","httpMethod":"PUT","userid":"abac7aee-78c4-4e26-8e4d-38eaf605fa13","authHash":"K4rNh","platform":"GenesysCloud","pureCloudSdk":"226.0.0","oauthClientName":"POSTMAN_Client_Credentiales","correlationId":"1e94e9b9-aba4-4fc8-a5de-7e767285c4d5","orgShortName":"interaxacolombia","out_templateURI":"/v3/trustors/{trustorOrgId}/trustees/{trusteeOrgId}/users/{userId}","homeOrganization":"9bb35534-a7d5-45db-b818-dab73775234a","out_queryString":"expandStarScope=false&showProperty=<redacted>","req_userAgent":"PureCloud SDK/python","req_requestURI":"api/v2/telephony/providers/edges/trunkbasesettings/c0e85954-b32e-453b-8faf-db1979de27e6","billable":"true","out_requestURI":"https://donut.us-east-1.mypurecloud.com/v3/trustors/9bb35534-a7d5-45db-b818-dab73775234a/trustees/9bb35534-a7d5-45db-b818-dab73775234a/users/abac7aee-78c4-4e26-8e4d-38eaf605fa13?expandStarScope=false&showProperty=<redacted>","req_host":"api.mypurecloud.com","out_httpMethod":"GET","organization":"9bb35534-a7d5-45db-b818-dab73775234a","httpStatusCode":"400"}
Based on internal consultation with colleagues, this custom build requires further review by our developer community: https://community.genesys.com/communities/gc-developer-community?CommunityKey=a39cc4d6-857e-43cb-be7b-019581ab9f38. You can initiate a discussion with our developer team, as they are better equipped to provide solutions for your custom build.
__________________________________________
Please, can you help me to detect de cause error?