Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Updating customer metafields is failing

Updating customer metafields is failing

NicoSpoke
Shopify Partner
23 0 17

Up until recently I was able to update a customers metafields by using the `{shop.url}/a/custmeta` endpoint. However, it recently started to return this error:

 

 

{"status": "ERROR", "message": "global name 'SHARED_SECRET' is not defined", "traceback": "['Traceback (most recent call last):\\n', '  File \"./app/mapp/proxy/views.py\", line 261, in handle_valid\\n    shopify.Session.setup(api_key=API_KEY, secret=SHARED_SECRET)\\n', \"NameError: global name 'SHARED_SECRET' is not defined\\n\"]"}

 

 

This is our script:

 

 

  return post({
    params: {
     'customer[id]': 000000000,
     'metafield[customer.mail_marketing]': true
    },
    then: ({status}) => {
      if (status === 'OK') {
        console.log('Succeded')
      } else {
        console.log('Failed')
      }
    },
    url: '{shop.url}/a/custmeta'
  })

 

 

 

What could be causing the above script to fail? It seems this has started to failed the last 2-3 days.

 

Thank you

Building digital interfaces for Shopify Stores
Replies 0 (0)