How to add scope for already exitsing APP in Shopify iam getting this error Can any one please help me

meher
New Member
5 0 0

$url="https://{{domain}}.myshopify.com/admin/customers/4873003651.json";

$username='XXXXXXXXXXX';
$password= "XXXXXXXXXXXX";

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, $username . ":" . $password);
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);   //get status code
$result=curl_exec ($ch);
curl_close ($ch);

print_r($result);

The Result iam getting this error

{"errors":"[API] This action requires read_customers scope."}

Replies 2 (2)
ND_Pete
Shopify Partner
6 0 1

When you set up your private app you can give very specific read/write permissions. So presumably your app does not have read access for customers.

https://help.shopify.com/api/guides/authentication/oauth#scopes

If you can edit the private app settings then it should be easy enough to fix.

 

If you DO have that permission and are still getting that error then I'm sorry I have no idea!

Jamie_D_
Shopify Staff (Retired)
Shopify Staff (Retired)
533 1 108

For a private application, you can set the access scopes in the Private apps section of the shop's admin dashboard For public, partner-created apps, you'll need to request the additional scope during the OAuth handshake.

Jamie | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog