1
votes

So I'm going through the oAuth2 process for Shopify and I am doing the following.

SHOP_NAME.myshopify.com/admin/oauth/authorize?client_id=xxxxx&scope_string=xxx&redirect_uri='mysite.com/shopify_callback'

Then exchanging the temporary token for an access_token by doing

SHOP_NAME.myshopify.com/admin/oauth/access_token?client_id=xxxxx&client_secret=XXXXX&code=xxxx

I am then getting back the access_token which I store - all good. However the initial launch point to get the App could be one of several places and I'd like to pass an additional parameter along with the oAuth2 parameters ..something like

SHOP_NAME.myshopify.com/admin/oauth/authorize?client_id=xxxxx&scope_string=xxx&redirect_uri='mysite.com/shopify_callback'&myparam='uniqueid'

SHOP_NAME.myshopify.com/admin/oauth/access_token?client_id=xxxxx&client_secret=XXXXX&code=xxxx&myparam='uniqueid'

so that the return is access_token AND myparam.

Is there a way to do this?

Thanks.

1

1 Answers

1
votes

You can attach required parameter in redirect_uri

SHOP_NAME.myshopify.com/admin/oauth/authorize?client_id=xxxxx&scope_string=xxx&redirect_uri='mysite.com/shopify_callback?myparam=uniqueid'