Make your first API request
Last updated
Was this helpful?
Last updated
Was this helpful?
All requests to Ecwid REST API require an access token. Ecwid uses OAuth 2.0 to provide secure access to the store data for public apps. If you customize your own store, however, you can skip OAuth and easily get an access token for your store.
This guide provides a walkthrough of a basic Ecwid API interaction, specifically, retrieving store profile information. To gain a deeper understanding of Ecwid API objects and their connections, refer to the API reference.
There is no test mode in Ecwid API, so we recommend setting up a separate test store. This way you can safely experiment and develop without impacting your live store and its data. By isolating your testing activities, you can maintain a smooth experience for both development and production environments.
API access to the store data is locked behind app authentication and request authorization based on the OAuth 2.0 standard. However, access to your store data is much simpler.
After signing up with Ecwid and getting a custom app, you already have two tokens:
Public token allows only public data to be received and is safe to use in public code.
Secret token grants full access to REST API (provided the app has all required permissions) and therefore must be kept safe.
Learn more about tokens, permissions, and other application settings in the App settings guide.
From the , open the Details page of the custom app, then copy one of the access tokens:
If the custom app is uninstalled from the store, you can reinstall it from the Details page. Click the Install button, then copy access tokens.
Now you have everything to start making REST API requests. Let's start with a simple GET request. Such requests require only two variables: store ID and access token.
You already have a custom app with access tokens. Get your store ID from any Ecwid admin page from URL or the footer.
Add store ID to the request path, your secret access token as a Bearer Token on the Authorization tab, and click Send:
That’s it. You should receive a JSON-formatted response with details about products in your store.
Congratulations on completing the quickstart guide!
Now you can make REST API requests, so it’s time to move further:
Now make a simple “Get products” request and execute it using, for example, the .