Articles on: OneHash Chat | Integration

Integrate OneHash Chat with Gatsby

Gatsby



OneHash Chat has an official Gatsby plugin for integrating the widget on your websites

Add gatsby-plugin-OneHash Chat to your gatsby project.

npm install --save gatsby-plugin-OneHash Chat


if you are using yarn, use

yarn add gatsby-plugin-OneHash Chat


Add the plguin to your gatsby config file

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-plugin-OneHash Chat`,
    options: {
      baseUrl: "BASE_URL", // Required
      websiteToken: "WEBSITE_TOKEN", // Required
      includeInDevelopment: false, // Optional
      OneChatSettings: {}, // Optional
    },
  },
];


You can get your website token and base url from your inbox settings, or you can create a new inbox from the OneHash Chat dashboard follwoing this link

Start your sever and You would be able to see the OneHash Chat widget on the page now.

Updated on: 27/09/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!