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

No authorized requests #6

Closed
omalave opened this issue Nov 29, 2019 · 2 comments
Closed

No authorized requests #6

omalave opened this issue Nov 29, 2019 · 2 comments

Comments

@omalave
Copy link

omalave commented Nov 29, 2019

Hi, I'm trying to test ChatCamp but it show me this errors and I have appId and channelId correct

image

Any clue?

@katendeglory
Copy link

Same issue here.

I believe this might be an overall bug with the entire tool.

The javascript examples from their demo page aren't working as well. Click on any demo in the link below.

https://chatcamp.io/demo

@darklrd
Copy link
Contributor

darklrd commented Nov 9, 2023

The error you're encountering typically occurs when there's a problem with the authentication process, specifically with the access_token which is a crucial part of user creation and authentication in ChatCamp.

To create a user, you should make a POST request to /api/2.0/users.create with the necessary payload. Here is an example of the payload:

{
  "id": "the_user_id",
  "display_name": "User's Display Name",
  "first_name": "User's First Name",
  "last_name": "User's Last Name",
  "email": "user@email.com",
  "phone_number": "User's Phone Number",
  "profile_url": "URL of the User's Profile",
  "avatar_url": "URL of the User's Avatar",
  "access_token": "User's Access Token"
}

After creating a user and obtaining the access_token, you need to initialize the ChatCamp SDK with the appId and then authenticate the user session with the access_token as described in our JavaScript Chat Authentication Documentation.

Please ensure that you follow the steps outlined in the documentation carefully. If authentication is not desired for testing purposes, we can disable the access_token requirement for your account. Keep in mind this should only be considered if you have adequate security measures in place.

We've checked our demo pages, and they are functioning as expected. If the issue persists, please double-check your app_id and ensure that the access_token is being used correctly as per the documentation.

For any further assistance, feel free to reach out to our support team.

@darklrd darklrd closed this as completed Nov 9, 2023
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

3 participants