how to update my scopes in my access token ?

hi,

scopes = "read_content,read_files,read_products,write_content,write_files,write_products"
export const loader = async ({ request }: LoaderFunctionArgs) => {
  const { admin, session } = await authenticate.admin(request);

  console.log({
    session,
  });

  return null;
};

# response 

{
 session: Session {
           id: "__id__.myshopify.com"
           shop: "__id__.myshopify.con",
           state: "",
           isOnline: boolen_value,
           scope: 'write_content,write_files,write_products'
           expires: undefined,
           accessToken: access_token,
           onlineAccessInfo: undfined
     }
}

scopes not update here,

i used this command to deploy new version

shopify app deploy

articles i hit this URL with postman, with the response access token i get this error:


	

	

can i use this URL, remix app ?

have any ans for this ?
thank :slightly_smiling_face:

Hi,

You need to add new scope to your existing scope and then need to authorize store by URL hit, you can follow my example below

 $app,
   ];
$redirect_url = get_home_url() . '/' . $app_slug . '_redirect/?' . http_build_query($param_qs);
                        $install_url = 'https://' . $shop . '/admin/oauth/authorize?client_id=' . $app_key . '&scope=' . $app_sopes . '&redirect_uri=' . $redirect_url;
?>

thanking you for your help :slightly_smiling_face:

but, i need access token to hit this url

https://admin.shopify.com/store/{storeid}/api/2024-04/articles.json

but i found author way to get this response form this url

[email removed]

but this url use in my loader are action i get this error

Type Error: Request cannot be constructed from a URL that includes credentials: