--- title: currentAppInstallation - GraphQL Admin description: Return the AppInstallation for the currently authenticated App. api_version: 2024-10 api_name: admin type: query api_type: graphql source_url: html: >- https://shopify.dev/docs/api/admin-graphql/2024-10/queries/currentAppInstallation md: >- https://shopify.dev/docs/api/admin-graphql/2024-10/queries/currentAppInstallation.txt --- # current​App​Installation query Return the AppInstallation for the currently authenticated App. ## Possible returns * App​Installation [App​Installation!](https://shopify.dev/docs/api/admin-graphql/2024-10/objects/AppInstallation) Represents an installed application on a shop. *** ## Examples * ### Get a list of access scopes #### Query ```graphql query AccessScopeList { currentAppInstallation { accessScopes { handle } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query AccessScopeList { currentAppInstallation { accessScopes { handle } } }" }' ``` #### Remix ```javascript const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query AccessScopeList { currentAppInstallation { accessScopes { handle } } }`, ); const data = await response.json(); ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query AccessScopeList { currentAppInstallation { accessScopes { handle } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query AccessScopeList { currentAppInstallation { accessScopes { handle } } }`, }); ``` #### Response ```json { "currentAppInstallation": { "accessScopes": [ { "handle": "read_all_orders" }, { "handle": "read_all_subscription_contracts" }, { "handle": "read_analytics_overviews" }, { "handle": "read_billing" }, { "handle": "read_checkouts" }, { "handle": "read_discovery" }, { "handle": "read_discovery_synonym_groups" }, { "handle": "read_payment_settings" }, { "handle": "read_subscription_plans" }, { "handle": "read_users" }, { "handle": "read_customer_merge" }, { "handle": "write_admin_shop_settings" }, { "handle": "write_analytics_overviews" }, { "handle": "write_apps" }, { "handle": "write_brand" }, { "handle": "write_brand_settings" }, { "handle": "write_content" }, { "handle": "write_customer_data_redaction_requests" }, { "handle": "write_customer_payment_methods" }, { "handle": "write_customers" }, { "handle": "write_discounts" }, { "handle": "write_discovery" }, { "handle": "write_discovery_synonym_groups" }, { "handle": "write_draft_orders" }, { "handle": "write_files" }, { "handle": "write_fulfillments" }, { "handle": "write_gift_cards" }, { "handle": "write_home" }, { "handle": "write_inventory" }, { "handle": "write_locations" }, { "handle": "write_marketing_events" }, { "handle": "write_media_processing" }, { "handle": "write_merchant_managed_fulfillment_orders" }, { "handle": "write_metaobjects" }, { "handle": "write_metaobject_definitions" }, { "handle": "write_notifications" }, { "handle": "write_online_store" }, { "handle": "write_online_store_pages" }, { "handle": "write_online_store_navigation" }, { "handle": "write_order_edits" }, { "handle": "write_orders" }, { "handle": "write_order_refunds" }, { "handle": "write_payment_mandate" }, { "handle": "write_price_rules" }, { "handle": "write_products" }, { "handle": "write_publications" }, { "handle": "write_reports" }, { "handle": "write_script_tags" }, { "handle": "write_shipping" }, { "handle": "write_themes" }, { "handle": "write_third_party_fulfillment_orders" }, { "handle": "write_customer_merge" }, { "handle": "write_companies" }, { "handle": "read_analytics" }, { "handle": "read_admin_shop_settings" }, { "handle": "read_apps" }, { "handle": "read_brand" }, { "handle": "read_brand_settings" }, { "handle": "read_content" }, { "handle": "read_customer_data_redaction_requests" }, { "handle": "read_customer_payment_methods" }, { "handle": "read_customers" }, { "handle": "read_discounts" }, { "handle": "read_draft_orders" }, { "handle": "read_files" }, { "handle": "read_fulfillments" }, { "handle": "read_gift_cards" }, { "handle": "read_home" }, { "handle": "read_inventory" }, { "handle": "read_locations" }, { "handle": "read_marketing_events" }, { "handle": "read_media_processing" }, { "handle": "read_merchant_managed_fulfillment_orders" }, { "handle": "read_metaobjects" }, { "handle": "read_metaobject_definitions" }, { "handle": "read_notifications" }, { "handle": "read_online_store" }, { "handle": "read_online_store_pages" }, { "handle": "read_online_store_navigation" }, { "handle": "read_order_edits" }, { "handle": "read_orders" }, { "handle": "read_payment_mandate" }, { "handle": "read_price_rules" }, { "handle": "read_products" }, { "handle": "read_publications" }, { "handle": "read_reports" }, { "handle": "read_script_tags" }, { "handle": "read_shipping" }, { "handle": "read_themes" }, { "handle": "read_third_party_fulfillment_orders" }, { "handle": "read_companies" } ] } } ``` * ### Retrieves a list of application charges #### Query ```graphql query { currentAppInstallation { oneTimePurchases(first: 10) { edges { node { createdAt id name price { amount currencyCode } status test } } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { currentAppInstallation { oneTimePurchases(first: 10) { edges { node { createdAt id name price { amount currencyCode } status test } } } } }" }' ``` #### Remix ```javascript const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { currentAppInstallation { oneTimePurchases(first: 10) { edges { node { createdAt id name price { amount currencyCode } status test } } } } }`, ); const data = await response.json(); ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { currentAppInstallation { oneTimePurchases(first: 10) { edges { node { createdAt id name price { amount currencyCode } status test } } } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { currentAppInstallation { oneTimePurchases(first: 10) { edges { node { createdAt id name price { amount currencyCode } status test } } } } }`, }); ``` #### Response ```json { "currentAppInstallation": { "oneTimePurchases": { "edges": [] } } } ``` * ### Retrieves a list of recurring application charges #### Query ```graphql query GetRecurringApplicationCharges { currentAppInstallation { activeSubscriptions { id name status lineItems { id plan { pricingDetails { __typename } } } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query GetRecurringApplicationCharges { currentAppInstallation { activeSubscriptions { id name status lineItems { id plan { pricingDetails { __typename } } } } } }" }' ``` #### Remix ```javascript const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query GetRecurringApplicationCharges { currentAppInstallation { activeSubscriptions { id name status lineItems { id plan { pricingDetails { __typename } } } } } }`, ); const data = await response.json(); ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query GetRecurringApplicationCharges { currentAppInstallation { activeSubscriptions { id name status lineItems { id plan { pricingDetails { __typename } } } } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query GetRecurringApplicationCharges { currentAppInstallation { activeSubscriptions { id name status lineItems { id plan { pricingDetails { __typename } } } } } }`, }); ``` #### Response ```json { "currentAppInstallation": { "activeSubscriptions": [] } } ``` [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20AccessScopeList%20%7B%0A%20%20currentAppInstallation%20%7B%0A%20%20%20%20accessScopes%20%7B%0A%20%20%20%20%20%20handle%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D) ```javascript const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query AccessScopeList { currentAppInstallation { accessScopes { handle } } }`, ); const data = await response.json(); ``` ## Response JSON ```json { "currentAppInstallation": { "accessScopes": [ { "handle": "read_all_orders" }, { "handle": "read_all_subscription_contracts" }, { "handle": "read_analytics_overviews" }, { "handle": "read_billing" }, { "handle": "read_checkouts" }, { "handle": "read_discovery" }, { "handle": "read_discovery_synonym_groups" }, { "handle": "read_payment_settings" }, { "handle": "read_subscription_plans" }, { "handle": "read_users" }, { "handle": "read_customer_merge" }, ```