Interface WhatsappBusinessCloudApiService


public interface WhatsappBusinessCloudApiService
The interface Whatsapp business cloud api service.
  • Method Details

    • sendMessage

      @POST("/{api-version}/{Phone-Number-ID}/messages") retrofit2.Call<MessageResponse> sendMessage(@Path("api-version") String apiVersion, @Path("Phone-Number-ID") String phoneNumberId, @Body Message message)
      Send message call.
      Parameters:
      phoneNumberId - the phone number id
      message - the message
      Returns:
      the call
    • uploadMedia

      @Multipart @POST("/{api-version}/{Phone-Number-ID}/media") retrofit2.Call<UploadResponse> uploadMedia(@Path("api-version") String apiVersion, @Path("Phone-Number-ID") String phoneNumberId, @Part okhttp3.MultipartBody.Part file, @Part okhttp3.MultipartBody.Part messageProduct)
      Upload media call.
      Parameters:
      phoneNumberId - the phone number id
      file - the file
      messageProduct - the message product
      Returns:
      the call
    • retrieveMediaUrl

      @GET("/{api-version}/{media-id}") retrofit2.Call<Media> retrieveMediaUrl(@Path("api-version") String apiVersion, @Path("media-id") String mediaId)
      Retrieve media url call.
      Parameters:
      mediaId - the media id
      Returns:
      the call
    • downloadMediaFile

      @GET @Streaming @Headers("User-Agent:curl/7.64.1") retrofit2.Call<okhttp3.ResponseBody> downloadMediaFile(@Url String url)
      Download media file call.
      Parameters:
      url - the url
      Returns:
      the call
    • deleteMedia

      @DELETE("/{api-version}/{media-id}") retrofit2.Call<Response> deleteMedia(@Path("api-version") String apiVersion, @Path("media-id") String mediaId)
      Delete media call.
      Parameters:
      mediaId - the media id
      Returns:
      the call
    • markMessageAsRead

      @POST("/{api-version}/{Phone-Number-ID}/messages") retrofit2.Call<Response> markMessageAsRead(@Path("api-version") String apiVersion, @Path("Phone-Number-ID") String phoneNumberId, @Body ReadMessage message)
      Send mark Meassge as read call.
      Parameters:
      phoneNumberId - the phone number id
      message - the message
      Returns:
      the call
    • twoStepVerification

      @POST("/{api-version}/{Phone-Number-ID}") retrofit2.Call<Response> twoStepVerification(@Path("api-version") String apiVersion, @Path("Phone-Number-ID") String phoneNumberId, @Body TwoStepCode twoStepCode)
      Two-step verification call.
      Parameters:
      phoneNumberId - the phone number id
      twoStepCode - the two-step code
      Returns:
      the call