Which scope do I need to access shop metafields?

Solved

Which scope do I need to access shop metafields?

nouredin
New Member
4 0 0

Hello there!

 

I'm developing an app to integrate Shopify with my service. I want to store some data in user's shop metafields so he/she doesn't have to enter it every time they open the app in their dashboard.

 

I'm just wondering, which scope should I ask users for in the authentication process? I couldn't find this information in Metafields or in access scopes.

 

Anyone can help?

 

Thanks!

Accepted Solution (1)
Visely-Team
Shopify Partner
1843 210 488

This is an accepted solution.

Apologies, that was a bad example. I should have said to read/write object's metafields you'd need read/write access for that object. There are no special scopes related to Shop object so you can use REST API to read/write shop's metafields as:

GET /admin/api/#{api_version}/metafields.json
POST /admin/api/#{api_version}/metafields.json

 

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog

View solution in original post

Replies 4 (4)

Visely-Team
Shopify Partner
1843 210 488

Hey! You just need the correct scope for the objects which metafields you want to access, i.e. Shop for your case.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
nouredin
New Member
4 0 0

Hey Sergiu, Thanks for your quick reply!

Which scope is responsible for accessing Shop resource? I can't find it in access scopes.

 

 

Visely-Team
Shopify Partner
1843 210 488

This is an accepted solution.

Apologies, that was a bad example. I should have said to read/write object's metafields you'd need read/write access for that object. There are no special scopes related to Shop object so you can use REST API to read/write shop's metafields as:

GET /admin/api/#{api_version}/metafields.json
POST /admin/api/#{api_version}/metafields.json

 

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
nouredin
New Member
4 0 0

Hey Sergiu,

 

I found that i don't need any specific scope to set shop metafields.

 

Thanks for your help.