Make: Difference between revisions

Jump to navigation Jump to search
Lesley (talk | contribs)
Lesley (talk | contribs)
Line 589: Line 589:
Before using API V2 with Make, we need to set up a data store to store the refresh token and the access token. We will also need to create a scenario that triggers every 24 hours to obtain a new token using the refresh token. Once this is set up, we can configure any scenario in Make using the Beds24 API V2, as we will always have an up-to-date token.
Before using API V2 with Make, we need to set up a data store to store the refresh token and the access token. We will also need to create a scenario that triggers every 24 hours to obtain a new token using the refresh token. Once this is set up, we can configure any scenario in Make using the Beds24 API V2, as we will always have an up-to-date token.


== Step 1: Create a Data Store ==
==== Step 1: Create a Data Store ====
1. Log into Make and go to '''More''' (the 2 dots) > '''Data Store'''.
1. Log into Make and go to '''More''' (the 2 dots) > '''Data Store'''.


Line 601: Line 601:




=== Configure the Data Store ===
''' Configure the Data Store '''


1. Give the data store a name (I suggest "Access Token").
1. Give the data store a name (I suggest "Access Token").
Line 644: Line 644:
[[Media:Image9.png|view large]]
[[Media:Image9.png|view large]]


== Step 2: Get Tokens from Beds24 ==
==== Step 2: Get Tokens from Beds24 ====
1. Log in to Beds24 and navigate to '''Settings > Apps & Integrations > API''' to generate a new invite code.
1. Log in to Beds24 and navigate to '''Settings > Apps & Integrations > API''' to generate a new invite code.
2. After you have the invite code, visit [https://api.beds24.com/v2/#/Authentication/get_authentication_setup Beds24 API Authentication Setup].
2. After you have the invite code, visit [https://api.beds24.com/v2/#/Authentication/get_authentication_setup Beds24 API Authentication Setup].
Line 665: Line 665:
7. Click '''Save''' at the top of the screen. You now have a data store containing your token and refresh token.
7. Click '''Save''' at the top of the screen. You now have a data store containing your token and refresh token.


== Step 3: Create a Scenario to Update the Token Every 24 Hours ==
==== Step 3: Create a Scenario to Update the Token Every 24 Hours ====
1. Create a new scenario in Make, and add the first module as '''Data Store – Search Record'''.
1. Create a new scenario in Make, and add the first module as '''Data Store – Search Record'''.


Line 713: Line 713:
[[Media:Image19.png|view large]]
[[Media:Image19.png|view large]]


== Step 4: Finalize the Scenario ==
==== Step 4: Finalize the Scenario ====
1. Edit the last module (Data Store) again, and map:
1. Edit the last module (Data Store) again, and map:
   * '''Access Token''' = Token from the HTTP module.
   * '''Access Token''' = Token from the HTTP module.
Line 723: Line 723:
2. Save the module and set it to trigger every 24 hours. This will make an API call every day to get a new token.
2. Save the module and set it to trigger every 24 hours. This will make an API call every day to get a new token.


== Step 5: Using the Token in API Calls ==
==== Step 5: Using the Token in API Calls ====
To make API calls to Beds24, first set the '''Data Store module – Get a Record'''. Insert your key (the number you set under Key). When you set up an HTTP module to make an API call, use the token from the data store, which will always be up to date.
To make API calls to Beds24, first set the '''Data Store module – Get a Record'''. Insert your key (the number you set under Key). When you set up an HTTP module to make an API call, use the token from the data store, which will always be up to date.


</div>
</div>
</div>
</div>