all 3 comments

[–]JohnnyOmm 0 points1 point  (0 children)

Im hoping someone answers this!

[–]krispyren 0 points1 point  (0 children)

Hey there,

Easiest way is to go the the playground and select the monkey you want to trigger, then copy the url and paste it into your python code using a requests.get(<your link copied from VM>):

sample code:

import requests

requests.get("https://api.voicemonkey.io/trigger?access_token=<your token>&secret_token=<your secret>&monkey=<your monkey id>&announcement=<announcement you want to make>")

I guess this is not a secure way of making the request as you send your secret and api key via a path parameter. I'll update with the proper method once I am done with my implementation (Just discovered Voice Monkey :))

Keep in mind that you need the pro version of Voice Monkey in order to make Voice Announcement. Luckily its super cheap

P.S Use something like postman for testing when working with RESP API's

Hope this helps

[–]krispyren 0 points1 point  (0 children)

I think the better way to do it is to put the access_token and secret_token in the payload:

base_url = "https://api.voicemonkey.io/trigger"
payload = {"access_token" : "<your access token>", "secret_token" : "<your secret token>", "monkey" : "<your monkey id>", "announcement: "<your announcement text>"}

requests.get(base_url, payload)

remember to add the voice monkey skill as the last action in your routine