Skip to content

Instantly share code, notes, and snippets.

@raecoo
Created April 23, 2018 08:51
Show Gist options
  • Save raecoo/218fecfcb8d53b21f4fc6ba5649bef33 to your computer and use it in GitHub Desktop.
Save raecoo/218fecfcb8d53b21f4fc6ba5649bef33 to your computer and use it in GitHub Desktop.
shopify webhook 403 error
?> shop
=> #<Shop id: 2485, owner: "Aline Vanliefland", merchant: "The Tutu Shop", email: "[email protected]", shopify_domain: "tutu-shop.myshopify.com", shopify_token: "89107fa464660844e79e27883da335a3", domain: "www.tutu-shop.com">
pome(prod)> ShopifyAPI::Shop.current
=> #<ShopifyAPI::Shop:0x00555ccb8bb078 @attributes={"id"=>12848253, "name"=>"The Tutu Shop", "email"=>"[email protected]", "domain"=>"www.tutu-shop.com", "province"=>"", "country"=>"BE", "address1"=>"Lamorinièrestraat 123", "zip"=>"2018", "city"=>"ANTWERPEN", "source"=>nil, "phone"=>"+32479912555", "latitude"=>51.20397269999999, "longitude"=>4.420967, "primary_locale"=>"en", "address2"=>"", "created_at"=>"2016-05-09T11:46:54+02:00", "updated_at"=>"2018-04-04T11:56:30+02:00", "country_code"=>"BE", "country_name"=>"Belgium", "currency"=>"EUR", "customer_email"=>"[email protected]", "timezone"=>"(GMT+01:00) Brussels", "iana_timezone"=>"Europe/Brussels", "shop_owner"=>"Aline Vanliefland", "money_format"=>"€{{amount}}", "money_with_currency_format"=>"€{{amount}} EUR", "weight_unit"=>"kg", "province_code"=>nil, "taxes_included"=>true, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"Shopify Plus", "plan_name"=>"shopify_plus", "has_discounts"=>true, "has_gift_cards"=>true, "myshopify_domain"=>"tutu-shop.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"€{{amount}}", "money_with_currency_in_emails_format"=>"€{{amount}} EUR", "eligible_for_payments"=>false, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "eligible_for_card_reader_giveaway"=>false, "finances"=>true, "primary_location_id"=>49830356, "checkout_api_supported"=>true, "multi_location_enabled"=>false, "setup_required"=>false, "force_ssl"=>true, "pre_launch_enabled"=>false}, @prefix_options={}, @persisted=true>
pome(prod)> sp=ShopifyAPI::Product.find(120657117204)
=> #<ShopifyAPI::Product:0x00555ccb920cc0 @attributes={"id"=>120657117204, "title"=>"Limited Edition: The Dutchess Tutu", "body_html"=>"<p>Order yours now! Only 300 available!</p>", "vendor"=>"Be Alice", "product_type"=>"Tutu", "created_at"=>"2018-02-23T19:27:38+01:00", "handle"=>"limited-edition-the-dutchess-tutu", "updated_at"=>"2018-04-23T10:45:44+02:00", "published_at"=>"2018-04-10T20:31:49+02:00", "template_suffix"=>nil, "published_scope"=>"global", "tags"=>"available to order, discontinue, kingsday, orange, short, Tutu", "variants"=>[#<ShopifyAPI::Variant:0x00555cc8152d48 @attributes={"id"=>1440383729684, "title"=>"Short / Small", "price"=>"35.99", "sku"=>"BA-TUTU-SHOR-S", "position"=>1, "inventory_policy"=>"continue", "compare_at_price"=>nil, "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "option1"=>"Short", "option2"=>"Small", "option3"=>nil, "created_at"=>"2018-02-23T19:27:38+01:00", "updated_at"=>"2018-04-20T15:07:30+02:00", "taxable"=>true, "barcode"=>"91029684", "grams"=>0, "image_id"=>713240248340, "inventory_quantity"=>38, "weight"=>0.0, "weight_unit"=>"kg", "inventory_item_id"=>1449147695124, "tax_code"=>"", "old_inventory_quantity"=>38, "requires_shipping"=>true}, @prefix_options={:product_id=>120657117204}, @persisted=true>, #<ShopifyAPI::Variant:0x00555cc8150a48 @attributes={"id"=>1440383795220, "title"=>"Short / Medium", "price"=>"35.99", "sku"=>"BA-TUTU-SHOR-M", "position"=>2, "inventory_policy"=>"continue", "compare_at_price"=>nil, "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "option1"=>"Short", "option2"=>"Medium", "option3"=>nil, "created_at"=>"2018-02-23T19:27:38+01:00", "updated_at"=>"2018-04-21T13:55:30+02:00", "taxable"=>true, "barcode"=>"91095220", "grams"=>0, "image_id"=>713240248340, "inventory_quantity"=>39, "weight"=>0.0, "weight_unit"=>"kg", "inventory_item_id"=>1449147760660, "tax_code"=>"", "old_inventory_quantity"=>39, "requires_shipping"=>true}, @prefix_options={:product_id=>120657117204}, @persisted=true>, #<ShopifyAPI::Variant:0x00555ccb927188 @attributes={"id"=>1595156561940, "title"=>"Long / Small", "price"=>"45.99", "sku"=>"BA-TUTU-LGOR-S", "position"=>3, "inventory_policy"=>"continue", "compare_at_price"=>nil, "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "option1"=>"Long", "option2"=>"Small", "option3"=>nil, "created_at"=>"2018-03-15T15:19:04+01:00", "updated_at"=>"2018-04-13T10:58:01+02:00", "taxable"=>true, "barcode"=>"63861940", "grams"=>0, "image_id"=>nil, "inventory_quantity"=>10, "weight"=>0.0, "weight_unit"=>"g", "inventory_item_id"=>1608714616852, "tax_code"=>"", "old_inventory_quantity"=>10, "requires_shipping"=>true}, @prefix_options={:product_id=>120657117204}, @persisted=true>, #<ShopifyAPI::Variant:0x00555ccb925e28 @attributes={"id"=>1595156594708, "title"=>"Long / Medium", "price"=>"45.99", "sku"=>"BA-TUTU-LGOR-M", "position"=>4, "inventory_policy"=>"continue", "compare_at_price"=>nil, "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "option1"=>"Long", "option2"=>"Medium", "option3"=>nil, "created_at"=>"2018-03-15T15:19:04+01:00", "updated_at"=>"2018-04-15T23:00:05+02:00", "taxable"=>true, "barcode"=>"63894708", "grams"=>0, "image_id"=>nil, "inventory_quantity"=>9, "weight"=>0.0, "weight_unit"=>"g", "inventory_item_id"=>1608714649620, "tax_code"=>"", "old_inventory_quantity"=>9, "requires_shipping"=>true}, @prefix_options={:product_id=>120657117204}, @persisted=true>, #<ShopifyAPI::Variant:0x00555ccb924ac8 @attributes={"id"=>1595156234260, "title"=>"Kids / Extra Small", "price"=>"29.99", "sku"=>"BA-TUTU-KDOR-XS", "position"=>5, "inventory_policy"=>"continue", "compare_at_price"=>nil, "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "option1"=>"Kids", "option2"=>"Extra Small", "option3"=>nil, "created_at"=>"2018-03-15T15:18:41+01:00", "updated_at"=>"2018-04-10T19:51:29+02:00", "taxable"=>true, "barcode"=>"63534260", "grams"=>0, "image_id"=>nil, "inventory_quantity"=>3, "weight"=>0.0, "weight_unit"=>"kg", "inventory_item_id"=>1608714289172, "tax_code"=>"", "old_inventory_quantity"=>3, "requires_shipping"=>true}, @prefix_options={:product_id=>120657117204}, @persisted=true>, #<ShopifyAPI::Variant:0x00555cc814a328 @attributes={"id"=>1440383762452, "title"=>"Kids / Small", "price"=>"29.99", "sku"=>"BA-TUTU-KDOR-S", "position"=>6, "inventory_policy"=>"continue", "compare_at_price"=>nil, "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "option1"=>"Kids", "option2"=>"Small", "option3"=>nil, "created_at"=>"2018-02-23T19:27:38+01:00", "updated_at"=>"2018-04-10T19:51:27+02:00", "taxable"=>true, "barcode"=>"91062452", "grams"=>0, "image_id"=>713240248340, "inventory_quantity"=>5, "weight"=>0.0, "weight_unit"=>"kg", "inventory_item_id"=>1449147727892, "tax_code"=>"", "old_inventory_quantity"=>5, "requires_shipping"=>true}, @prefix_options={:product_id=>120657117204}, @persisted=true>, #<ShopifyAPI::Variant:0x00555cc81484b0 @attributes={"id"=>1440383827988, "title"=>"Kids / Medium", "price"=>"29.99", "sku"=>"BA-TUTU-KDOR-M", "position"=>7, "inventory_policy"=>"continue", "compare_at_price"=>nil, "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "option1"=>"Kids", "option2"=>"Medium", "option3"=>nil, "created_at"=>"2018-02-23T19:27:38+01:00", "updated_at"=>"2018-04-10T19:51:25+02:00", "taxable"=>true, "barcode"=>"91127988", "grams"=>0, "image_id"=>713240248340, "inventory_quantity"=>5, "weight"=>0.0, "weight_unit"=>"kg", "inventory_item_id"=>1449147793428, "tax_code"=>"", "old_inventory_quantity"=>5, "requires_shipping"=>true}, @prefix_options={:product_id=>120657117204}, @persisted=true>, #<ShopifyAPI::Variant:0x00555ccb933078 @attributes={"id"=>1595156529172, "title"=>"Kids / Large", "price"=>"29.99", "sku"=>"BA-TUTU-KDOR-L", "position"=>8, "inventory_policy"=>"continue", "compare_at_price"=>nil, "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "option1"=>"Kids", "option2"=>"Large", "option3"=>nil, "created_at"=>"2018-03-15T15:19:04+01:00", "updated_at"=>"2018-04-10T19:51:25+02:00", "taxable"=>true, "barcode"=>"63829172", "grams"=>0, "image_id"=>nil, "inventory_quantity"=>4, "weight"=>0.0, "weight_unit"=>"kg", "inventory_item_id"=>1608714584084, "tax_code"=>"", "old_inventory_quantity"=>4, "requires_shipping"=>true}, @prefix_options={:product_id=>120657117204}, @persisted=true>], "options"=>[#<ShopifyAPI::Option:0x00555ccb931700 @attributes={"id"=>163641262100, "product_id"=>120657117204, "name"=>"Style", "position"=>1, "values"=>["Short", "Long", "Kids"]}, @prefix_options={}, @persisted=true>, #<ShopifyAPI::Option:0x00555ccb9311d8 @attributes={"id"=>163641229332, "product_id"=>120657117204, "name"=>"Size", "position"=>2, "values"=>["Small", "Medium", "Extra Small", "Large"]}, @prefix_options={}, @persisted=true>], "images"=>[#<ShopifyAPI::Image:0x00555ccb930670 @attributes={"id"=>713240248340, "position"=>1, "created_at"=>"2018-02-23T19:28:51+01:00", "updated_at"=>"2018-03-08T09:18:14+01:00", "alt"=>"The Dutchess Tutu", "width"=>1125, "height"=>1684, "src"=>"https://cdn.shopify.com/s/files/1/1284/8253/products/image.jpg?v=1520497094", "variant_ids"=>[1440383729684, 1440383762452, 1440383795220, 1440383827988]}, @prefix_options={:product_id=>120657117204}, @persisted=true>], "image"=>#<ShopifyAPI::Image:0x00555cc8143730 @attributes={"id"=>713240248340, "position"=>1, "created_at"=>"2018-02-23T19:28:51+01:00", "updated_at"=>"2018-03-08T09:18:14+01:00", "alt"=>"The Dutchess Tutu", "width"=>1125, "height"=>1684, "src"=>"https://cdn.shopify.com/s/files/1/1284/8253/products/image.jpg?v=1520497094", "variant_ids"=>[1440383729684, 1440383762452, 1440383795220, 1440383827988]}, @prefix_options={:product_id=>120657117204}, @persisted=true>}, @prefix_options={}, @persisted=true>
pome(prod)> ShopifyAPI::Webhook.all
ActiveResource::ForbiddenAccess: Failed. Response code = 403. Response message = Forbidden.
from (irb):88
pome(prod)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment