0

I have an interesting use case for you today.

My team and I are building a free, third party, calculator tool that enables users to calculate metrics using their store's data.

We are looking for ways to pull in the necessary data and perform the calculation to show users... so far the best we've come up with is asking the users to export a report from Shopify and upload it into our application.

Looking for a user experience similar to this:

  1. User opens our tool, application is hosted on custom-domain.com

  2. Somehow the user authenticates or logins in to Shopify, or approves our app temporary access to their data.

  3. Our app performs the calculation for the user, ending data access

Any ideas as to how this authentication or access of data can be facilitated? Shopify doesn't seem to have a 'login with Google' kind of authentication button.

Thanks!

1 Answer 1

1

There are two modes for authenticated access, namely Online and Offline. What you need in this scenario is Online Access.

From Shopify Docs

Tokens with online access mode are linked to an individual user on a store, where the access token's lifespan matches the lifespan of the user's web session. This type of access mode is meant to be used when a user is interacting with your app through the web, or when an app must respect an individual user's permission level.This access mode must be explicitly requested in the authorization phase.

It should also fulfill your needs related to ending data access.

  • An access token created with this access mode is temporary, and is guaranteed to expire after some amount of time.
  • When a user logs out of Shopify admin, all online mode access tokens created during the same web session are revoked.

Once you have the access token, you can use Shopify API to query data so that your users don't have to upload any files manually.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! So basically, the user is prompted to give permission, which in turn generates an access token for that session. Perfect, thank you very much. I was really confused by their docs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.