Strugling with integration of Amitychat SDK + NextJS

Hello, this is the first time I am integrating amitychat + nextJS. and I am having issues sending messages to a single user.Maybe I am not good enough to read the documentation. I use the same code from the official Amitychat github repo, but that code is giving an error. If anyone can help me, I will be very thankful.

Hello @Hdobi , Regarding your issue, we would like to ask for additional information:

  1. The version of the TS SDK you are using.
  2. The error you encountered (please provide a screenshot, code, and response).
  3. Your full code.

Thank you for replying. I have no issue posting my code here, but I want to ask that I see a lot of code about amitychat, like sending a message in a group or creating a group. There is no code in the github repo to send a message to one person like a normal 1 to 1 chat.
code for group chat.
“use client”;
import { AmityUiKitProvider, AmityUiKitChat } from “@amityco/ui-kit”;
import { useUser } from ‘@auth0/nextjs-auth0/client’;
function page() {

const apiKey = “”;
const { user } = useUser();

return (



<AmityUiKitProvider
key={user?.sub}
apiKey={apiKey}
apiRegion={‘EU’}
apiEndpoint=“https://api.sg.amity.co
userId={user?.sub}
displayName={user?.name}
>

  </div>
</div>

)
}

export default page
Even in my provided group chat code, every new user is automatically added to the group.

@Hdobi I’ll pass this information to the relevant team and keep you updated.

Hello @Hdobi,

To create a 1-1 chat, please refer to our documentation available here: Creating a Conversation Channel.

Our GitHub repository is just an example and may not cover everything. For specific cases, please see our documentation for detailed instructions.

Chat docs: Chat | Amity Docs

Hello, I tried my best to setup everything, but I am having issues. Can you please provide me with the with the proper code flow for that 1-to-1 chat? because I tried hard to figure it out, but that code is still not working.

@Hdobi We would like to request more details about where you are encountering issues in the implementation of 1:1 chat. Is it during the creation process or when querying messages?

hello, I also have a problem with group message, like when new use login in amitychat than the amitychat group automatically add that person into previous any random group or groups, but it should only add if someone go into group setting and add the new person. it should not do on autho mode when every new user come on amitychat, here is the code of group chat. “use client”;
import { AmityUiKitProvider, AmityUiKitChat } from “@amityco/ui-kit”;
import { useUser } from ‘@auth0/nextjs-auth0/client’;
function page() {

const apiKey = “”;
const { user } = useUser();

return (



<AmityUiKitProvider
key={user?.sub}
apiKey={apiKey}
apiRegion={‘EU’}
apiEndpoint=“https:api.sg.amity.co”
userId={user?.sub}
displayName={user?.name}
>

   </div>
 </div>

)
}

export default page

@Hdobi From the issue you’re facing, could you please provide a screen recording and the full code snippet where you encounter the problem?