To work with the MotoPress Hotel Booking REST API, you must go through authentication.
The following authentication methods are supported:
Basic Auth
OAuth 1
To authenticate, you are required to have two access tokens:
consumer_key
consumer_secret
You can create access tokens in the administrator dashboard: Accommodation > Settings > Advanced
In the REST API responses, you can see response-related links. For the better REST API usability and performance, some links can be embeddable resources.
To get an extended response with embedded resources in the request, add the GET parameter _embed
.
Specify the list of IDs required for embedding links separated by commas.
Or add _embed
= true
to embed all related resources.
- Follow this link and click the
Start Free Trial
button to create your demo site. - Confirm the creation of your site via email.
- Log in to your demo.
- Create access tokens in the administration dashboard: Accommodation > Settings > Advanced.
- Navigate to Hotel Booking REST API documentation.
- Fill in the
demo-id
field using a part of URL value of your created demo site.
For example if your demo URL is hbdemo.getmotopress.com/z8p5rxxxx7xfeck/wp-admin, thendemo-id
isz8p5rxxxx7xfeck
. - To log in, click the
Authorize
button and use theconsumer_key
andconsumer_secret
credentials.