Assuming the user has access to TIBCO Cloud subscriptions in parent and child organizations. Below are the steps for using OAuth token from the parent organization to access the child organization.
1. Generate an OAuth token in the parent org.
Doc link:
Generating Access TokensExample: Access token name: Test
Secret access token: ***********************
scope: TSC TCI
2. Use the Get UserInfo API to get the subscription locator for all the orgs the user has access to.
API: https://api.cloud.tibco.com/tci/docs/#/User
Curl:
curl -X 'GET' \
'https://api.cloud.tibco.com/tci/v1/userinfo' \
-H 'accept: application/json' \
-H 'Authorization: Bearer CIC~*********************'
3. Use the SuscriptionLocator ID of the child org in the required API call
subscriptionLocator: Enter 0 for the subscription associated with your OAuth token.
Curl 1: will return all the TCI apps in the parent subscription.
curl -X 'GET' \
'https://api.cloud.tibco.com/tci/v1/subscriptions/0/apps' \
-H 'accept: application/json' \
-H 'Authorization: Bearer CIC~****************'
Curl 2: will return all the TCI apps in the child org whose subscriptionLocator is td4aqsqh6hi5qtl-scma7wwlksiznt
curl -X 'GET' \
'https://api.cloud.tibco.com/tci/v1/subscriptions/td4aqsqh6hi5qtl-scma7wwlksiznt/apps' \
-H 'accept: application/json' \
-H 'Authorization: Bearer CIC~*******************'