php-shopify icon indicating copy to clipboard operation
php-shopify copied to clipboard

getAccessToken returns HTTP Code 400

Open bhumikadividebuy2024 opened this issue 1 year ago • 0 comments

Hi, I'm trying to call the getAccessToken function. I've put the function call in a try-and-catch block and got this response: "PHPShopify\Exception\CurlException: Request failed with HTTP Code 400.". What am I doing wrong here?

I've already set the ShopUrl with the 'shop.myshopify.com' format.

I've verified the params and URL and the details are as below.

API URL: https://{store_name}.myshopify.com/admin/oauth/access_token
params: {
    "client_id" : "client_id",
    "client_secret" : "client_secret",
    "code": "code"
}

Error: image

bhumikadividebuy2024 avatar Jun 07 '24 06:06 bhumikadividebuy2024