Hello Sir/Mam
I m facing error during submit my blog post with blog API. Plese check error below.
“errors”:“[API] This action requires merchant approval for write_content scope.”
Please provide me solution. as soon as possible..
Here is my code
$arr = array(‘blog’=>array(‘title’=> ‘IPod Updates’));
$url= ‘https://mittens-and-max-com.myshopify.com/admin/api/2021-10/blogs.json’;
$data = array(‘blog’=>array(‘title’=> ‘IPod Updates’));
$ch = curl_init(); // Initialize cURL
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “POST”);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$headers = array(
'X-Shopify-Access-Token: '.$access_token,
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$return = curl_exec($ch);
print_r($return);