Advertisement
Guest User

Untitled

a guest
Sep 19th, 2021
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. ## Streamlabs Notifications
  2. * **Source**: https://streamlabs.com/
  3. * **Icon Support**: Yes
  4. * **Message Format**: Text
  5. * **Message Limit**: 32768 Characters per message
  6.  
  7. ### Account Setup
  8. The process to get signed up with Streamlabs is a bit lengthy.
  9.  
  10. **Note:** The screenshots and instructions below are 100% full credit to the **[LNBits Project](https://github.com/Fittiboy/lnbits)** ([found here](https://github.com/Fittiboy/lnbits/tree/master/lnbits/extensions/streamalerts#stream-alerts)).
  11.  
  12. At the moment, the only service that has an open API to work with is Streamlabs, so this setup requires linking your Twitch/YouTube/Facebook account to Streamlabs.
  13.  
  14. 1. Log into [Streamlabs](https://streamlabs.com/login?r=https://streamlabs.com/dashboard).
  15. 1. Navigate to the API settings page to register an App:
  16. ![image](https://user-images.githubusercontent.com/28876473/127759145-710d53b6-3c19-4815-812a-9a6279d1b8bb.png)
  17. ![image](https://user-images.githubusercontent.com/28876473/127759182-da8a27cb-bb59-48fa-868e-c8892080ae98.png)
  18. ![image](https://user-images.githubusercontent.com/28876473/127759201-7c28e9f1-6286-42be-a38e-1c377a86976b.png)
  19. 1. Fill out the form with anything it will accept as valid. Most fields can be gibberish, as the application is not supposed to ever move past the "testing" stage and is for your personal use only.
  20. In the "Whitelist Users" field, input the username of a Twitch account you control. While this feature is *technically* limited to Twitch, you can use the alerts overlay for donations on YouTube and Facebook as well.
  21. For now, simply set the "Redirect URI" to `http://localhost`, you will change this soon.
  22. Then, hit create:
  23. ![image](https://user-images.githubusercontent.com/28876473/127759264-ae91539a-5694-4096-a478-80eb02b7b594.png)
  24. 1. Now we'll take the Client ID from the Streamlabs page and generate a code that will be used for apprise to communicate with Streamlabs
  25. Replace the placeholders in the link below with your Client ID
  26. https://www.streamlabs.com/api/v1.0/authorize?client_id=<YOURCLIENTID>&redirect_uri=http://localhost&response_type=code&scope=donations.read+donations.create+alerts.create
  27. You are redirected to localhost
  28. copy the url param code that is specified in the browser url bar
  29. http://localhost/?code=<YOURCODE>
  30. 1. Generate an access token using your code generated in the last step, your Client ID, and your Secret
  31. Open a terminal and make a request to generate an access token that Apprise will utilize
  32. ```bash
  33. curl --request POST --url 'https://streamlabs.com/api/v1.0/token' -d 'grant_type=authorization_code&code=<YOURCODE>&client_id=<YOURCLIENTID>&client_secret=<YOURSECRET>&redirect_uri=http%3A%2F%2Flocalhost'
  34. ```
  35. ``
  36. Similar JSON should be returned
  37. {"access_token":<YOURACCESSTOKEN>,"token_type":"Bearer","expires_in":3600,"refresh_token":""}
  38. Note that the access token does not expire
  39. 1. Now copy and paste your access token to build the streamlabs url
  40. strmlabs://<YOURACCESSTOKEN>/?call=DONATIONS
  41.  
  42. ### Syntax
  43. Valid syntax is as follows:
  44. * `strmlabs://{access_token}/`
  45.  
  46. ### Parameter Breakdown
  47. | Variable | Required | Description
  48. | ------------ | -------- | -----------
  49. | access_token | Yes |The access token generated from your Streamlabs account.
  50.  
  51. #### Example
  52. Send a streamlabs notification:
  53. ```bash
  54. # Assuming our {access_token} is abcdefghij1234567890
  55. apprise -vv -t "Test Message Title" -b "Test Message Body" \
  56. strmlabs://abcdefghij1234567890/
  57. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement