Shopify OAuth2 Account

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

Known Issues

None.

Account Settings

 

Field Name

Field Description

Description

Field Name

Field Description

Description

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 secret

N/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 token

N/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 token

N/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 expiration

N/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 parameter

N/A

Specify the name for the token endpoint parameter.

Default Value: N/A
ExampleScope

Authentication parameter value

N/A

Specify the value for the parameter.

Default Value: N/A
Exampleread_orders, write_orders

Auto-refresh token

N/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.

Learn more about how the SnapLogic Platform handles token refresh failures.

Default Value: N/A
ExampleShopify-OAuth2

Authorize

N/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

Error

Reason

Resolution

Error

Reason

Resolution

"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.


See Also