0
votes

I have built an embedded Shopify app (in Rails) using the shopify_app gem. To be able to make API calls to the Shopify store front, I need to exchange a URL parameter "code" for an authentication token. My understanding is, that this parameter should be available in the URL after the app has been installed - however this is not the case for me.

Please, how can I get the "code" parameter? so that I can authenticate my app and send API calls.

Thank you

2
Hey, could you post error message that you're getting? Did you follow instructions inside the gem like described here github.com/Shopify/shopify_app#quickstartNikola Đuza
Thank you. Yes I have followed the instruction. I am not getting any error; I simply don't know how to get the "code" paramter. My app as such works well without it; however I am not able to send API calls to the store front.Franta1441

2 Answers

0
votes

I think the code parameter you are looking for is found in Step 3 of OAuth process with Shopify as described here https://help.shopify.com/en/api/getting-started/authentication/oauth#step-3-confirm-installation

0
votes

The shopify_app library does the initial authentication of the app and after instalation automatically converts the 'code' parameter into the appropriate token, which is to be used to authenticate your API calls. The token is stored in the Db under shop:shopify_token. Make sure to specify 'create_scripttags' in your application scope.