Flow A is mandatory for all new apps starting 1. Nov 2020.
There are two simple ways the user can initiate the connection between your app and Cloudbeds.
This article will explain the different approaches and how to fully set them up.
A diagram below shows both user flows.
This flow allows the user to connect and disconnect the apps only from Cloudbeds Marketplace. There's no need for you to implement any changes to your app UI.
When a user navigates to your app landing page in Cloudbeds Marketplace and clicks "Connect App", they will immediately initiate the authorization with your app.
As soon as the user clicks "Allow Access" to approve the permission scopes, an API session is established and the "Connect App" button will change to "Login" to redirect to your login page.
API keys automatic delivery method is the recommended authentication method for all Marketplace partners.
For API Key automatic delivery or OAuth 2.0. alternative authentication, after the user authorizes the integration, they are redirected to your pre-defined redirect URL. Make sure you link the authorization code to the correct account on your side. This process must be fully automated.
If you use API key email delivery, the user will see a pop-up window confirming that the connection has been completed and you should then proceed to retrieve their API key from your Cloudbeds partner account and complete the next onboarding steps on your side. You will also receive an email notification that a new property has connected your app.
Flow B is not supported with the API key email delivery method. Flow A is the only option available in that case.
This flow allows you to manage the connection process from your app. Users will have to be logged into your app to initiate the connection process. Cloudbeds Markteplace will redirect the users to your Login/Register page. Users can always disconnect the apps from Cloudbeds.
1. Use our script for "Connect to Cloudbeds" button and implement it into your app's UI. Find the script in App Details page in your Cloudbeds Partner Account.
2. When connection was established hide the Connect to Cloudbeds button or make it clear to the users that there's an active connection, and they can't initiate the connection again.
2.1. If you allow the user to disconnect the apps in your UI, make sure to send us state=disabled in the postAppState call.
2.2 If the user can't disconnect the apps in your UI, make sure you're subscribed to our app state webhook so you're notified when they disconnect the apps in Cloudbeds' myfontdesk.
3. In your Cloudbeds Partner Account, navigate to App Details page and scroll to Connection Settings section. Add your Login/Register page URL and save. When a user navigates to your app landing page in Cloudbeds Marketplace and clicks "Connect App" they will be redirected to your launch URL.
When the user clicks "Approve" and API session is established, "Connect App" button will change to "Login" and redirect to your login page.
Always add the URL to your app's login page. After the user has authorized your app (regardless of the flow A or B) the main action button in the Marketplace will change from "Connect App" to "Login". This allows us to send the user directly to your login page.