Translate c# Http request into php CURL, what is “request.AddParameter” of c# in php?

I’ve a c# sample script as following:

/* Step One: Call /auth/token for client Authentication and to obtain an Access Token */
/* Replace siteDomainName with the corresponding domain URL*/
var client = new RestClient("{siteDomainName}/auth/token");
client.Timeout = -1;

string svcCredentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes({applicationId} + ":" + {sharedSecret}));
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic " + svcCredentials);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ "RefreshToken": {refeshToken} }",ParameterType.RequestBody);

IRestResponse response = client.Execute(request);
var tokenResponse = JsonConvert.DeserializeObject( response.Content);

/* Step Two: Call Product API /v1/product/{productCode} using the Access Token obtained for API Authorization */
client = new RestClient("{siteDomainName}/v1/product/{productCode}");
client.Timeout = -1;

var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer {tokenResponse.Token}");
request.AddParameter("text/plain", "",  ParameterType.RequestBody);

IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

I don’t understand how to translate this line request.AddParameter("application/json", "{ "RefreshToken": {refeshToken} }",ParameterType.RequestBody);

here is the php so far i tried

<?php
$app_id = "20dd14a2d3cfsdf4eb1234756b26b";
$shared_secret = "d561e8sdf8ca0b914f452201ad523";
$refresh_token = "39fe926b233dfb130ca0f69e8356c";
$svcCredentials = base64_encode($app_id .":". $shared_secret);

$url = "https://example.com.au";

$ch = curl_init($url . "/auth/token");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, "application/json");
curl_setopt($ch, CURLOPT_POSTFIELDS, '{ RefreshToken: {39fe926b96sdfb130ca0f69e8356c} }');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                    "Authorization: Basic $svcCredentials",
                    "Content-Type: application/json"
                ));
//curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData))));

$token = curl_exec($ch);
var_dump($token);