If you’re using Java on the server, this library will simplify writing the server-side portions of Cord.
Include the com.cord:server
package, available in the mavenCentral()
repository.
com.cord:server:0.0.+
import com.cord.server.*;
String clientToken = Cord.getClientAuthToken(
"<YOUR-APP-ID>",
"<YOUR-SECRET>",
new ClientAuthTokenData
.ClientAuthTokenDataBuilder("user_id", "org_id")
.organizationDetails(new PlatformOrganizationVariables
.PlatformOrganizationVariablesBuilder("org_name")
.build())
.userDetails(new PlatformUserVariables
.PlatformUserVariablesBuilder("email")
.firstName("first_name")
.lastName("last_name")
.profilePictureUrl("url")
.build())
.build());
The result will be a valid client auth token.
On this page