Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getOrCreateChat #3

Open
vrrock opened this issue Nov 25, 2021 · 0 comments
Open

getOrCreateChat #3

vrrock opened this issue Nov 25, 2021 · 0 comments

Comments

@vrrock
Copy link

vrrock commented Nov 25, 2021

Hi, I have an issue with getOrCreate chat. So basically, I have this piece of code here that has data, and my headers below which store current user credentials.

 const [headers, setHeaders] = useState({
    'Project-ID': 'project_id_number',
    'User-Name': {buyerName},
    'User-Secret': "nope",
  })

  const data = {
    "usernames": [buyerName, res.data.firstName],
    "is_direct_chat": true
  }

  console.log(data)
  getOrCreateChat(headers, data, chat => setChat(chat))

This is similar to the marketplace case but when I run this, I get a 403 error which means I am still unauthorized to getOrCreateChat. Can you help me out? I am just trying to create a chat between two users, knowing the current user's credentials and the username of the current user and other user.

Would appreciate help with this as soon as possible!:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant