phpbigcommerce

How Can I Retrieve Refresh_token from Big Commerce?


I have the following code to get Access token and it returns access token, but tje response contains not refresh token. What could be the reason?

$token_url = 'https://login.bigcommerce.com/oauth2/token';
$post_data = [
    'client_id' => $client_id,
    'client_secret' => $client_secret,
    'code' => $code,
    'grant_type' => 'authorization_code',
    'redirect_uri' => $redirect_uri,
];

Solution

  • Searching further, I got the information that BigCommerce access tokens are generally long-lived, meaning they do not expire frequently. You might not need a refresh token if your access token is valid for an extended period.