Welcome to the Java SDK that enables you to communicate with all that the Wink platform has to offer.
This SDK contains libraries you can leverage to communicate with the Wink platform.
Maven artifacts were compiled with Java 17. Java 1.8 is the lowest supported version.
Spring is not required but we highly recommend you use. Our examples will be based on how to do it the "Spring way".
Download libraries from Maven Central Repository.
Spring-enabled OAuth2 bean that manages your keys.
<dependency>
<groupId>travel.wink</groupId>
<artifactId>iam-sdk-java</artifactId>
<packaging>jar</packaging>
<version><!-- see Releases --></version>
</dependency>
Using Spring, @Import(OAuth2WebClientConfiguration.class) or run a component scan over travel.wink.sdk.support
and you let the library manage OAuth2 state for you.
You will need a client ID and a client secret to communicate with any of the Wink platform endpoints. You can create your account and get your credentials here:
Steps:
- Register your personal user account
- Log in
- Create your first account
- Select that account
- Choose to create an Application for that account
- The application will hold your credentials
Add your credentials to your property file:
- wink.travel.client.id=YOUR_CLIENT_ID
- wink.travel.client.secret=YOUR_CLIENT_SECRET
Create 2 environment variables in your preferred way:
- WINK_TRAVEL_CLIENT_ID=YOUR_CLIENT_ID
- WINK_TRAVEL_CLIENT_SECRET=YOUR_CLIENT_SECRET
If you are developing for WordPress, we've [probably] got you covered. Check out our WordPress plugin:
- Wink Java SDK repo: https://github.com/wink-travel/wink-sdk-java
- TripPay Java SDK repo: https://github.com/wink-travel/trip-pay-sdk-java
- Wink WordPress plugin repo: https://github.com/wink-travel/affiliate-wordpress-plugin
- Wink WordPress Divi plugin repo: https://github.com/wink-travel/affiliate-wordpress-divi-plugin
- WordPress: https://wordpress.org/plugins/iko-travel-affiliate/