Estimated reading time: 11 minutes Updated: 9/11/2024 Created by: Jessica B

How to access Botmaker API v2.0?

Article describing how to access APIv2 documentation.


This article explains how to access Botmaker API v2.0. If you want to continue using the v1.0 API, you can refer to the ANNEX at the end of this document.


Estimated reading time: 11 minutes


By going to Configuration>Integrations>API (https://go.botmaker.com/#/api), you can access all the documentation related to the Botmaker APIv2.0 by clicking on the tab Documentation.



In the menu on the left of the screen, you will see all the ENDPOINTS and their respective sections with related documentation.



Also, by clicking the button Export, on the right of the screen, you can download a .json file with the v2.0 API code.


To view or manage your credentials, click the tab Credentials on the main API screen, as shown in the following image:



There, you will see the access token, the secret ID, and the Refresh Token to integrate the API into your project.


ANNEX API v1


If you want to use API v1.0 from the main API v2.0 screen as detailed above, click the button Use v1.0 to access or revoke the corresponding access credentials. You can also follow the detailed process in the section titled Access, as was done before the implementation of the new version (2.0).



Access


To access the API methods and their swagger specifications (Botmaker API documentation:https://go.botmaker.com/apidocs/), you must follow the following steps that will allow you to obtain an access token:


1 - Access the channel configuration page.

2 - Select Botmaker API -Credentials.

3 - Generate a token or use the one that was already generated. In particular, it is important to keep the access token.


When you have generated the Token, access the swagger: API



Click the “authorize” button (top right) and enter the access token in the second text field, as shown below. Then, click on authorize.




Note: To prevent messages from arriving asynchronously (that is, the schedules downloaded by the API do not coincide with those of the platform), you must take the following into account:


  • The date must be in format ISO-8601 (for example: 2021-05-21T16:21:20.535Z)

This format includes the timezone. In this case, Z indicates that it is GMT-0.

  • When processing large numbers of messages, priority is given to sending them in parallel and not the order, so sendings may be disordered. Even if you have sent them in sequence to WhatsApp, they may not be able to send them in sequence due to unpredictable connectivity issues.
  • To ensure the sending follows an order, you can wait for delivery confirmation by webhook and then send the next message. Another alternative is to space the messages of that conversation with a wait to ensure that they are processed in sequence and not in parallel.


For more details on using the Botmaker API, see our related article How to use Botmaker API?


Remember to visit our Help Center for more information.



Written by: Botmaker Team


Updated: 12/18/2023