All Collections
ROADMAP
API Version 5.0 - Integration
API Version 5.0 - Integration
Deon Don avatar
Written by Deon Don
Updated this week

tldr;

Use:


Old url that is no longer in use:

USER STORY (A):
I'm testing the API with curl this way:

curl -H "Accept: application/json" -H 'Content-Type: application/json' -v 'https://app.pavlok.com/api/v1/stimuli/beep/1?access_token={{my_access_token}}

But I get 404 status code in the response. Is there some thing wrong with my request or is your API misbehaving?
Wed. Mar. 8 2023 11:58 a.m. EST


PAVLOK STORY (A):

First of all, the API endpoint accepts POST requests and not GET requests. You need to add -X POST to the curl command as a parameter to send a POST request.Also there is one required field to pass in POST Data (the body) which is reasonEndpoint also seems to be wrong.
correct endpoint:
https://app.pavlok.com/api/v1/beep/255

255 here represents the signal's intensity.Full example:

curl --location 'https://app.pavlok.com/api/v1/vibration/255?access_token={{YOUR_ACCESS_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "reason": "Sent at 15:51" }'

-X POST can be omitted when --data is present.
You can also pass your access token inside the POST data and remove it from the GET parameters.You can replace vibration with beep/shock to send beep and zap signals respectively.

Wed. Mar. 8 2023 11:59 a.m. EST


USER STORY (B):

A customer asked if the Shock Clock 3 can be controlled using HTTP API?


PAVLOK STORY (B):
Mon. Feb. 6 2023 08:37 a.m. EST

New API Links:

Version 5

October 2022

An API is a way for Software like Smartphone Apps to talk to the Pavlok 3 App.

Version 5 will be our most powerful API release ever.

By my estimates it will be ready around December 2022.

March 2016

The Pavlok API is designed as a way to connect Pavlok to the IoT world, as well as create new opportunities for application-based integrations and triggers.

EASY TO GET SETUP

You can trigger Pavlok with as little as four lines of code (this example is using Node):

Here are the resources to get you started:

NODE MODULE

Writing a script using this module is a pretty straight forward process. Keep in mind the requirements and limitations documents under the 'Purpose' heading, but if you're looking to do some simple scripting, you should be in for a pretty easy ride.

OAUTH

More secure than the Node module, but will take a little bit longer to get up and running. You can use OAuth to interact with the Pavlok API on behalf of an user within your application:

  • Register on Pavlok

  • Register your application

  • Authorize your application

  • Get the token


-------------------------------------------

This is an Article Stub by Pavlok Article Writer and Producer Deon Don.

If you have any questions about this topic or feature request please text me anytime at (731) 472-8565. Yes anytime, I won't reply right away but I will reply when I check my inbox.

I read every single message.

Did this answer your question?