phpclassic / php-shopify

PHP SDK for Shopify API
Apache License 2.0
568 stars 211 forks source link

getAccessToken returns HTTP Code 400 #325

Open bhumikadividebuy2024 opened 2 months ago

bhumikadividebuy2024 commented 2 months ago

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