Rates and Transit Times API is giving 400 Bad Request error if I change the account number using codeigniter 4

I am working with program where we need to fetch details from fedex Rates and Transit API, the API works fine with the account number which is linked to API project in developers portal but once I try to change another account number the API returns “file_get_contents(https://apis.fedex.com/rate/v1/rates/quotes): Failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request” error ..
can’t find the enough information on API documentation and in search.

Qustion 1: I want to confirm is there any restriction on API end that we can fetch data from only those accounts which are linked? or we need to change our parametes?

Question 2: I’ve used try catch block to handle error but this errors still crash the application, any way to handle this?

public function callAPI()
{

    $this->accountNumber->set_value('11111111');


    //set shipper postalcode and country code 
    $this->shipper->set_postalCode(12345);
    $this->shipper->set_countryCode('US');
    $this->shipper->set_residential(false);



    //set recipient postalcode and country code 
    $this->recipient->set_postalCode(456789);
    $this->recipient->set_countryCode('US');
    $this->recipient->set_residential(true);


    //set weight and units 
    $this->weight->set_units('LB');
    $this->weight->set_value(26);



   $this->requestedShipment->set_shipper(['address' => $this->shipper]);
   $this->requestedShipment->set_recipient(['address' => $this->recipient]);
   $this->requestedShipment->set_requestedPackageLineItems(array(['weight' => $this->weight]));


    //set pickup type 
    //types: "CONTACT_FEDEX_TO_SCHEDULE", "DROPOFF_AT_FEDEX_LOCATION", "USE_SCHEDULED_PICKUP"
    $this->requestedShipment->set_pickupType("USE_SCHEDULED_PICKUP");

    // set type of rate to be returned 
    //types: "LIST", "INCENTIVE", "ACCOUNT", "PREFERRED" (see documentation for explanations)
    $this->requestedShipment->set_rateRequestType(['ACCOUNT']);


    //set shipment date 
    $this->requestedShipment->set_shipDateStamp("2023-08-17");


  $this->rateRequestControlParameters->set_return_tranist(true);
    $accountNumberJSON = json_encode($this->accountNumber);
    $requestedShipmentJSON = json_encode($this->requestedShipment);

     $url = "https://apis.fedex.com/oauth/token";


    //client id is api key and client secret is secret key
    $data = [
        'grant_type' => 'client_credentials',
        'client_id' => 'my_clinet_id',
        'client_secret' => 'my_clinet_secret'
    ];

    $options = array(
        'http' => array(
            'header' => "Content-type: application/x-www-form-urlencoded",
            'method' => 'POST',
            'content' => http_build_query($data)
        )
    );

    $context = stream_context_create($options);
    $resp = file_get_contents($url, false, $context);
    $response_data = json_decode($resp);
    $access_token = $response_data->access_token;
    
    //calls function if token is working (token changes every minute)
    if (isset($access_token)) {
        echo $this->get_rates($access_token, $this->accountNumber, $this->requestedShipment, $this->rateRequestControlParameters); 
    }
}

function get_rates($token, $acct, $ship, $rateReqCtrlPara)
{
    $url = "https://apis.fedex.com/rate/v1/rates/quotes";

    $data = ['accountNumber' => $acct, 'requestedShipment' => $ship, 'rateRequestControlParameters' => $rateReqCtrlPara, 'carrierCodes' => array('FDXG') ];
    $options = array(
        'http' => array(
            'header' => [
                "Content-type: application/json",
                "Authorization: Bearer {$token}",
                "X-locale: en_US"
            ],
            'method' => 'POST',
            'content' => json_encode($data)
        )
    );

    $context = stream_context_create($options);
    try{ 
            $resp_data = file_get_contents($url, false, $context); //error here
    }
    catch (exception $e) { echo $e; }
  return $resp_data;
}