Skip to content
Mehrdad Pajuhaan edited this page Oct 23, 2026 · 1 revision

FAQ

Answers to common questions about @selldone/sdk-community, including the setup errors developers run into most often.

Can I try the SDK without my own community?

Yes. window.$community.getCommunityID() without a shop returns 1, the main Selldone community. Use it to test reading info and searching posts.

getInfo() throws "Not valid community id!"

The community ID is empty. This usually means getCommunityID(shop) was called with a shop that has no community yet (shop.community is missing), or with a shop object that was loaded without its community. Create the community first (in the Selldone dashboard, or with POST /shops/{shop_id}/community via window.CAPI.POST_COMMUNITY_CREATE), or reload the shop with its community.

Every request goes to a URL that starts with undefined

The selldone-capi meta tag is missing, so window.CAPI has no base URL. Add <meta name="selldone-capi" content="https://capi.selldone.com"> before calling CapiCommunity.Setup().

Reading works, but posting, reacting or following fails

Write actions need a signed-in user. The Community SDK does not handle authentication; it uses whatever Authorization header is set on window.axios. In a storefront, set up the Storefront SDK before the Community SDK so the customer's session is used. Otherwise set the header yourself.

I can't import CommunityURLs from @selldone/sdk-community

The package entry exports only CapiCommunity. Import the helper by path:

import { CommunityURLs } from "@selldone/sdk-community/url/CommunityURLs";

CommunityURLs throws "The service url is not defined in [service-url] meta tag!"

The link helpers need the main service URL. Add <meta name="service-url" content="https://selldone.com">, and selldone-iframe if you build embed links. See Getting Started.

Is there a ready-made community UI?

Yes. Components (@selldone/components-vue) contains the full community UI used by the Selldone Storefront: layout, home, feed, category and topic pages, post editor, comments, polls, reports, moderation and statistics. The Storefront mounts it under /community.

Can I use the SDK in Node.js?

Not directly. It reads its configuration from <meta> tags and registers globals on window. On a server, call the community routes listed in Community API URL Builders with any HTTP client.

How do I paginate post search?

searchPosts(community_id, offset, limit, search) returns { posts, more }. Increase offset by limit while more is true. See JavaScript SDK.

Are there rate limits?

Community API limits are not documented in this repository. Debounce search inputs, cache results with .cache() and .optimize(), and handle 429 Too Many Requests with a back-off and retry.

Related