Rechat SDK
    Preparing search index...

    Testimonials

    sdk.Testimonials fetches the brand's client testimonials — text, an optional 1–5 rating, and the contact who gave it. Use it to render a reviews section on your site.

    Portal-only. Requests are routed through the portal, which resolves the brand from the current domain. On a hostname with no registered portal these methods reject — see portals in the SDK overview.

    const sdk = new Rechat.Sdk()

    const { data, info } = await sdk.Testimonials.list({ limit: 20, start: 0 })

    data.forEach(t => {
    const name = t.contact
    ? `${t.contact.first_name ?? ''} ${t.contact.last_name ?? ''}`.trim()
    : 'Anonymous'

    console.log(`${'★'.repeat(t.rating ?? 0)} ${t.content}${name}`)
    })

    console.log(`Showing ${info.count} of ${info.total}`)
    Param Default Description
    limit 20 Results per page
    start 0 Pagination cursor: index of the first testimonial to return
    Field Description
    content The testimonial text
    rating 1–5 rating, or absent
    contact { first_name, last_name, email } of the author, or null