{"id":1765,"date":"2023-03-26T22:08:44","date_gmt":"2023-03-26T14:08:44","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1765"},"modified":"2023-03-26T22:08:44","modified_gmt":"2023-03-26T14:08:44","slug":"when-do-shopify-access-tokens-expire","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/26\/when-do-shopify-access-tokens-expire\/","title":{"rendered":"When do shopify access tokens expire"},"content":{"rendered":"<blockquote>\n<p>Offline access tokens do not expire, which tells me you&#8217;re probably working with online access tokens (which last as long as the user&#8217;s web session)<\/p>\n<p>Offline access tokens only expire when the app is uninstalled or your revoke the token yourself. Online access tokens expire with the admin session of the user who the access token was granted for. <\/p>\n<\/blockquote>\n<p><!-- more --><\/p>\n<blockquote>\n<p>Offline access tokens don&#8217;t expire unless your app is uninstalled or you revoke the access token. Online access tokens on the other hand, only last as long as the user&#8217;s admin session.<\/p>\n<\/blockquote>\n<p>API access modes: <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/shopify.dev\/concepts\/about-apis\/authentication#api-access-modes\">https:\/\/shopify.dev\/concepts\/about-apis\/authentication#api-access-modes<\/a><br \/>\nAuthenticate with OAuth: <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/shopify.dev\/tutorials\/authenticate-with-oauth\">https:\/\/shopify.dev\/tutorials\/authenticate-with-oauth<\/a><\/p>\n<pre><code class=\"language-bash\">https:\/\/{shop}.myshopify.com\/admin\/oauth\/authorize?client_id={api_key}&amp;scope={scopes}&amp;redirect_uri={redirect_uri}&amp;state={nonce}&amp;grant_options[]={access_mode}<\/code><\/pre>\n<ul>\n<li>scopes: <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/shopify.dev\/docs\/admin-api\/access-scopes\">https:\/\/shopify.dev\/docs\/admin-api\/access-scopes<\/a><\/li>\n<li>access_mode: Defaults to offline access mode if left blank or omitted<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Offline access tokens do not expire, which tells me you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[445],"tags":[],"class_list":["post-1765","post","type-post","status-publish","format-standard","hentry","category-shopify"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1765"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1765\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}