Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue running test #133

Open
alkahtani opened this issue Oct 23, 2023 · 2 comments
Open

issue running test #133

alkahtani opened this issue Oct 23, 2023 · 2 comments
Labels
question Further information is requested

Comments

@alkahtani
Copy link

I am getting this error when running testing unit below

`WhatsappApiFactory factory = WhatsappApiFactory.newInstance(TestConstants.TOKEN);

    WhatsappBusinessCloudApi whatsappBusinessCloudApi = factory.newBusinessCloudApi();
    Message message = MessageBuilder.builder()//
            .setTo(PHONE_NUMBER_1)//
            .buildTextMessage(new TextMessage()//
                    .setBody(Formatter.bold("Hello world!") + "\nSome code here: \n" + Formatter.code("hello world code here"))//
                    .setPreviewUrl(false));


    MessageResponse messageResponse = whatsappBusinessCloudApi.sendMessage(PHONE_NUMBER_ID, message);

    System.out.println(messageResponse.toString());`

My Pom.xml :

`

4.0.0

org.springframework.boot
spring-boot-starter-parent
2.7.17


com.waba.connector
waba-connector
0.0.1-SNAPSHOT
waba-connector
to connect to whatsapp api

<java.version>1.8</java.version>



org.springframework.boot
spring-boot-starter-data-jpa


org.springframework.boot
spring-boot-starter-web

	<dependency>
		<groupId>com.h2database</groupId>
		<artifactId>h2</artifactId>
		<scope>runtime</scope>
	</dependency>
	<dependency>
		<groupId>com.oracle.database.jdbc</groupId>
		<artifactId>ojdbc8</artifactId>
		<scope>runtime</scope>
	</dependency>
	<dependency>
		<groupId>org.postgresql</groupId>
		<artifactId>postgresql</artifactId>
		<scope>runtime</scope>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-test</artifactId>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>com.github.Bindambc</groupId>
		<artifactId>whatsapp-business-java-api</artifactId>
		<version>v0.3.4</version>
	</dependency>
</dependencies>

<build>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
		</plugin>
	</plugins>
</build>
<repositories>
<repository>
	    <id>jitpack.io</id>
	    <url>https://jitpack.io</url>
	</repository>
</repositories>
`

My JAVA Version :
java 13.0.2 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)

Please direct me

@github-actions
Copy link

Hello and welcome! We're glad to see that you've opened your first issue. We appreciate your contribution and would love to hear more about the problem you're experiencing. Our team is actively monitoring this repository and we will do our best to respond to your issue as soon as possible. Thank you for using our project and we look forward to working with you!

@Bindambc
Copy link
Owner

Bindambc commented May 7, 2024

Hello @alkahtani, this WhatsApp SDK works only with Java versions 17 or higher.

@Bindambc Bindambc added the question Further information is requested label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants