Shopify OAuth2 Account

In this article

Overview

You can use this account type to connect Shopify Snaps with data sources that use Shopify OAuth2 accounts for authenticating public and custom Apps. Shopify uses OAuth2 authorization code grant flow to issue access tokens on behalf of users.

The public and custom apps use OAuth2 Account type.

  • Public app: Public apps are meant for developers who want to distribute their apps to multiple merchants.
  • Custom app: Custom apps are meant for developers building an app tailored for a single merchant. 

Prerequisites

Set up a store in Shopify.

Limitations

  • API versions: Shopify releases new API versions every quarter. Each stable version is supported only for a minimum of 12 months. Part of a Shopify API is deprecated if it becomes unnecessary, unsafe, or outdated. The API’s are marked as deprecated when they are removed in a newer version of the API. The deprecation is then retroactively applied to previous stable versions of the API.
  • API Rate Limit: All Shopify APIs are rate-limited. Shopify uses various strategies to enforce rate limits, such as Calculated query cost, Request-based limit, and Time-based limit. 
    Shopify Snap Pack uses admin APIs, which are applicable for Request-based limit. If the APIs cross the rate limit, the Snap fails.

    API

    Rate-limiting method

    Standard limit

    Shopify Plus limit

    Admin API

    (GraphQL)

    Calculated query cost

    50 points/second

    100 points/second

    Admin API

     (REST)

    Request-based limit

    2 requests/second

    4 requests/second

Known Issues

None.

Account Settings


Field NameField DescriptionDescription
Label*N/A

Specify a unique label for the account.

Default Value: N/A
ExampleShopify-OAuth2

Store Name*N/A

Specify the store name for which you want to create the account.

Default Value: N/A
Exampledemo-store-sl

Client ID*N/A

Specify the client ID associated with your Shopify application. You can create the client ID as advised by your application provider.  See Shopify documentation for more information.

Default Value: N/A
Example1abcd23e-45fg-6789-hi01-23456jk789l0

Client secretN/A

Specify the client secret associated with your account. You can create the client secret as advised by your application provider. The client secret is securely stored in SnapLogic's cloud data warehouse. See Shopify documentation for more information.

Default Value: N/A
Exampleaxsf9242f9nsh67f2276b9ws4cadd14

Access tokenN/A

Auto-generated upon account authorization. The access token associated with the Shopify application is used to make API requests on behalf of the user associated with the client ID.

The access token might be refreshable, in that case an optional refresh token can be stored. You must get a new access token if the access token has expired and no refresh token was defined or both the access and the refresh token have expired.

Default Value: N/A
ExampleN/A

Refresh tokenN/A

Auto-generated upon account authorization. The token used to refresh the access token.

If the refresh token is stored, then the access token can be refreshed automatically before it expires.

Default Value: N/A
ExampleN/A

Access token expirationN/A

Auto-generated upon account authorization. The access token expiration value.

Default Value: N/A
Example-1

OAuth2 authorization endpoint*N/A

Enter the authorization endpoint to authorize the application.

Default Value: N/A
Examplehttps://store87.myshopify.com/admin/oauth/authorize

OAuth2 token endpoint*N/A

Specify the token endpoint to get the access token.

Default Value: N/A
ExampleShopify-OAuth2

Authorization endpoint config

Use this field set to define custom properties for OAuth2 endpoint. This field set contains the following fields:

  • Authentication Parameter
  • Authentication Parameter Value
Authentication parameterN/A

Specify the name for the token endpoint parameter.

Default Value: N/A
ExampleScope

Authentication parameter valueN/A

Specify the value for the parameter.

Default Value: N/A
Exampleread_orders, write_orders

Auto-refresh tokenN/A

Select this checkbox to refresh the token automatically if the Refresh Token field is enabled. If you deselect this checkbox, the token might expire and will not be refreshed automatically.

Default Value: N/A
ExampleShopify-OAuth2

AuthorizeN/A

Click this button to acquire the required permissions for this account when creating an account.

For existing accounts, you can click this button to re-acquire the permissions (Access token, Refresh token, and Access token expiration) to ensure that the account works as expected. This action does not require or result in any changes to the Access token that is already generated.

Troubleshooting

ErrorReasonResolution
"400 Bad Request"

The request was not understood by the server, generally due to bad syntax or because the Content-Type header was not correctly set to application/json
This status is also returned when the request provides an invalid code parameter during the OAuth token exchange process.

Enter valid token details.

"401 Unauthorized"The necessary authentication credentials are not present in the request or are incorrect.Enter valid authentication credentials.
"403 Forbidden"The server is refusing to respond to the request. This is generally because you have not requested the appropriate scope for this action.Request for the scope that is defined in your account.

Snap Pack History

 Click here to expand...
Snap Pack Version 

Release

Date

Type

Updates

November 2024

main29029

 

Stable

Updated and certified against the current Snaplogic Platform release.

August 2024

main27765

 

Stable

Upgraded the org.json.json library from v20090211 to v20240303, which is fully backward compatible.

May 2024437patches27471 Latest

Fixed a resource leak issue with the Shopify Snaps, which involved too many stale instances of ProxyConnectionManager and significantly impacted memory utilization.

May 2024

main26341

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2024main25112 StableUpdated and certified against the current SnapLogic Platform release.
November 2023main23721 StableUpdated and certified against the current SnapLogic Platform release.
August 2023main22460 StableUpdated and certified against the current SnapLogic Platform release.

May 2023

main21015 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023main19844 StableUpgraded with the latest SnapLogic Platform release.
November 2022main18944 StableUpgraded with the latest SnapLogic Platform release.
August 2022main17386 StableUpgraded with the latest SnapLogic Platform release.
4.29main15993 StableUpgraded with the latest SnapLogic Platform release.
4.28main14627 StableUpgraded with the latest SnapLogic Platform release.
4.27main12833 StableUpgraded with the latest SnapLogic Platform release.
4.26 

main11181

Latest

Introduced the Shopify Snap Pack that enables businesses to set up an online store and sell their products online with ease. You can use this Snap Pack to create orders, products, customers, and run automated workflows. This Snap Pack offers the following Snaps:


See Also