Node rest request on /collections/count.json response

Solved
arturmihno
Tourist
5 1 0

Hi!
I faced some issue while making node REST request to Admin API and in response I get 
┃ {
┃ errors: 'Scope undefined for API access: collections. Valid scopes: admin_login_tokens, admin_notifications, admin_shop_settings, all_orders, all_subscription_contracts, analytics, analytics_overviews, apps, assigned_fulfillment_orders, banking, banking_notifications, billing, capital, cash_tracking, channels, checkout_settings, checkouts, checkouts_vault_tokens, content, customer_events, customer_payment_methods, customer_self_serve_settings, customer_tags, customers, delivery, detailed_merchant_profile, discounts, disputes, domains, draft_orders, files, fulfillments, gdpr_data_request, gift_card_adjustments, gift_cards, home, images, inventory, kit_skills, legal_policies, locales, locations, marketing_events, media_processing, merchant_managed_fulfillment_orders, meta_tags, mobile_payments, mobile_platform_applications, notification_settings, notifications, online_store, online_store_bot_protection, online_store_navigation, online_store_pages, online_store_preferences, online_store_privacy_settings, order_edits, orders, own_subscription_contracts, payment_gateways, payment_sessions, payment_settings, payment_terms, physical_receipts, point_of_sale_devices, pos_channel.access, pos_compliance.access, price_rules, product_engagements, product_inventory, product_listings, product_recommendations, product_tags, products, publications, reports, resource_feedbacks, retail_addon_subscriptions, retail_bbpos_merchant, retail_payment_providers, retail_roles, retail_user_data, sales_agreements, script_tags, scripts, shipping, shopify_payments, shopify_payments_accounts, shopify_payments_balance_debits, shopify_payments_bank_accounts, shopify_payments_bank_accounts_sensitive, shopify_payments_disputes, shopify_payments_ledgers, shopify_payments_legal_entities, shopify_payments_payouts, shopify_payments_payouts_status, shopify_payments_transfers, smart_grid, social_network_accounts, stripe_terminal_readers, subscription_plans, taxes, themes, third_party_fulfillment_orders, tracking_pixels, translations, user_private_data, and users'
┃ }

it seems like I missed to set some scopes to my app

I tried to set these scopes 

SCOPES=read_draft_orders,write_draft_orders,write_order_edits,read_orders,write_orders,read_customers,write_customers,read_content,write_content,read_products,write_products

But it didn't help me at all still face this issue. Have you any ideas how can I fix this one.



 

 

0 Likes
_JB
Shopify Staff
Shopify Staff
822 97 178

Hey @arturmihno,

Can you share more details about the request you're making? If possible, provide the X-Request-ID value from the response headers and I can use this to check our logs for more info.

That error message suggests collections was requested as a scope, which isn't valid. Are you able to successfully install this app on a shop? If not, what scopes do you see in the URL when you land on the /oauth/request_grant screen?

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
arturmihno
Tourist
5 1 0

This is an accepted solution.

Hi,
Thanks a lot for the respone. I have already resolved my issue. The problem was that it is not available to get collections via rest request on collections from shopify app. I resolved it by fetching 
/admin/custom_collections.json and it response me with 200 status. 
Have a great day for all!

0 Likes