Start a new topic

dynamic POST call with button

I am interested to know if bttn can be used the following way. 

I have a REST api (POST) that takes a unique session id and some other dynamic information.    I want the bttn to 'pair' with this POST call.  The tricky bit is the session id changes every time, say, 2 hours based on certain conditions.  How do I get bttn to recognise and use the POST call with right session id automatically?  Is there a physical ID on the bttn server that I can remotely configure the REST call for the button?

1 Comment

You could perhaps use the bttn REST API to dynamically change your bttn's POST data.

The dynamic webhook can be set up as follows:

1) create an API key under user account settings

2) set your bttn's action as HTTP -> select 'call webhook' option and then select your new API key. Fill in the rest of the form and save your action.

3) have your server make a request to the 'hook' API endpoint to set the URL and POST arguments (including the session ID)

4) repeat step 3 every time your session ID changes.

Please see the api documentation for details:

Login or Signup to post a comment