Public APP, Invalid API key or access token

New Member
4 0 0

Hi Experts,

 

I am developing a public App by using REST API, when tested in devstore it installs correct and I can get access token no problem, but when make request it always response error [API] Invalid API key or access token (unrecognized login or wrong password). I searched similar topics in this forum but no luck, please kindly help. Please see details below:

 

- using REST API

- Scope: read_content

access_mode: online access mode

- got access token no problem 

- API call got error (in PHP):

$url = 'https://'.$shop.'/admin/oauth/access_scopes.json';
 
$headers = array();
$headers[0] = 'X-Shopify-Access-Token: '.$access_token;
$headers[1] = 'Content-Type: application/json';
 
$ch = curl_init( $url );
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
 
$response = json_decode(curl_exec($ch),true);
curl_close($ch);
 
print_r($response);

Thanks in advance.

0 Likes
Highlighted
New Member
4 0 0

Can anyone help me on this? Thanks a lot -_-

0 Likes
Highlighted
New Member
4 0 0

Anyone can help? I wrote to support team but replied me to ask here ... 

0 Likes
Highlighted
New Member
4 0 0

Still waiting, anyone has same issue?

0 Likes