How to connect Etsy APIv3 to API2Cart?
To add a store from Etsy APIv3, you need etsy_client_id і etsy_refresh_token
etsy_client_id is a keystring of the App created in Development Apps. To manage your apps, go to https://www.etsy.com/developers/your-apps and add a new application.
For successful registration of the application, the store registration must be fully completed (all supporting documents sent to Etsy, connected card for payment, etc.), otherwise there may be nuances with the registration of the application or its authorization with OAuth 2.0 for further work.
Once an app is registered, Etsy reviews and approves it. After the Etsy app is approved, you can authorize it via Oauth 2.0 and perform requests.
You can do it with the help of a postman. For this, you need to create a new request and select the Oauth2.0 authorization type on the Authorization tab.
- Token Name - an arbitrary name for the token to be used in postman
- Grant Type - Authorization Code (With PKCE)
- Callback URL - callback_url, which is registered for this application
- Auth URL - https://www.etsy.com/oauth/connect
- Access Token URL - https://api.etsy.com/v3/public/oauth/token
- Client ID - keystring of created application (parameter etsy_client_id)
- Code Challenge Method - SHA-256
- Scope - following scopes can be used for the applicationі: address_r address_w billing_r cart_r cart_w email_r favorites_r favorites_w feedback_r listings_d listings_r listings_w profile_r profile_w recommend_r recommend_w shops_r shops_w transactions_r transactions_w
- https://developer.etsy.com/documentation/essentials/authentication/ - here you can find the information about scopes
- State - a one-time marker created specifically for this request. An arbitrary set of symbols and numbers.
- Client Authentication - Send client credentials in body
When receiving a token, you need to confirm access permission for the application.
After successful authorization, we will receive a refresh_token, which can be used to add a store to the app.
Important! Please note that Etsy does not have a sandbox environment, and you must test your APP on a production store. Therefore, we advise you to read and strictly follow the API Testing Policy.