0

What I am trying to do is the following

I am not sure if its me, or if their documentation is complicating or what the issue is but what I cannot figure out is how to build the GET request.

I am using Laravel and VueJS for this project (just for the sake of transparency) but if I could figure out how to create a manual CURL request to get the info, I could then build the code around it.

If someone could give me some guidance or even better give me an example CURL that grabs the data I would be forever grateful

ArcticMediaRyan
  • 687
  • 8
  • 32

1 Answers1

0

You can scroll down and find this section where they mention the CURL request in an authentication example. They have also mentioned how to generate these hashes. In the general section they have mentioned that your API URL has your cluster name in it.

Since you mentioned VueJS, I'm assuming you'll be using it in the frontend, so, you could use the fetch() method like so -

const res = await fetch(`http://api-${cluster_name}.pusher.com/apps/[app_id]/channels?auth_key=<your_auth_key>&auth_timestamp=<auth_timestamp>&auth_version=1.0&auth_signature=<your_sign>`);

Since you are sending a GET request, I don't think you will need a body-md5 as a query parameter, which you'd need in case of a post request where you'll be sending JSON data in the body.

This is the first time I'm answering a question on stackoverflow, I really hope this helps :) Good day!

  • Yep you are correct in most of that but it also seems to want other data. When I do what you show above it only gives me rooms that have people in there but not the user_count. That’s where I am lost. – ArcticMediaRyan Oct 17 '21 at 17:38