API

API

Intro to APIs

OCP API is used to retrieve data from the flow you build. Here are some examples that you could do with OCP API.

  • Pull the flow you have built from OCP.

  • Create, delete or obtain data including flow tag, flow field.

  • Dealing with the data about the subscribers, involving getting the subsribers' information, editing their tag or field as well as the subflow sended to the subscribers.

  • Configure all the data used in e-commerce such as carts or products.

If you need to deal with the data below, next sections will introduce the steps to use the OCP API.

 

Authorize

Since the protection of the data is important to the API, it needs to use several attribute to authorize your identity. Therefore, the first step you must do is to enter the authorized information. You need to click the Authorize button.

Then, there are three attributes that you need to fill in the textbox.

 


Here are the ways to find these attributes in the following section.

 

Generate API Key (http,Bearer)

Step 1 After you login the account in OCP, at the top right corner, it will show your account name and avatar. Click it and choose the Your Settings in the dropdown list.

 

Step 2 Go to the API Keys Section by clicking the button in the User Setting. Enter the key name you would like to set and click the Create button.

 



Step 3 Then you will get key in a pop-up window.

 

 


WARNING - Here is your new API Key. This is the only time the key will ever be displayed, so be sure not to lose it! You may revoke the key at any time from your API settings.

 

Close the window you will get the basic information about the key except the value of the key.

 

Get the Curl and Request URL

Curl is used in API requests. In OCP API documentation, you need some operation before getting the curl in the OCP api documentation.

Here, we use Get Flow Tag as an example.

Step 1. Click the expand operation of category, the Flow Tag in this case. Then find the action and the feature, Get /flow/tags. Click the row and a page will dropdown shown as following.

 

Step 2. This logo means authorize. If you have done this before, this step is not required.

Step 3. Click Try it out. Then you will see that the Parameters or Request body part could be inputted and the Exexute Button is shown at the bottom of this part.

 

Step 4. Enter the parameters or request body required and click the Execute Button. Finally you will get the Curl and Request URL.

 

TIP - Click the Clear button if you need reset the parameters.

 

Responses

This part display the Json result you will get from the OCP API. Normally if the code is 200, it means that you get the response successfully. If the code is 400, it means that there is error in your response.

 


Example Value / Schema

 

Apart from example value, you can click on "Schema" to view more details like which value is mandatory.

 


    • Related Articles

    • FAQs about WhatsApp Cloud API

      Q. How can I reply to clients on my mobile phone? You can use Mobile Browser for same. Secondly, we will launch our Mobile App s Q. Can I use my current mobile WhatsApp number in the WhatsApp cloud API? You can not use your existing WhatsApp number ...
    • Migrating from On-Premises API to Cloud API (or vice-versa)

      This document explains how to migrate business phone numbers from On-Premises API to Cloud API. Note that migrating a business phone number from one API to another is not the same as migrating a number from one WhatsApp Business Account (WABA) to ...
    • STOP-LIGHT DOCUMENTATION for Template API

      STOP-LIGHT DOCUMENTATION The released documentation covers how to use APIs to send templates directly from the Marketing panel. POST https://connect.api-wa.co/project-apis/v1/project/{project_id}/messages PARAMETER Project_id : XXX AUTH ...
    • Why I can't see test number when I synced my WhatsApp Cloud API?

      The reason you didn’t see the test number from cloud API is that, once you have connected with real number in your Cloud API, the test number is no longer offered from meta.
    • Get your Webhook from OCP [WhatsApp Cloud API]

      Now, you need to go back to OCP, and then select the WhatsApp cloud, click “Connect WhatsApp Cloud” After you click the button, it will pop up the window for you to authorize your Facebook account, and then select the business account you want to ...