All URIs are relative to https://api.letsdeel.com/rest/v2
Method | HTTP request | Description |
---|---|---|
createPublicToken | POST /public-tokens | Create a public token |
PublicTokenCreatedContainer createPublicToken(createPublicTokenContainer).execute();
Create a public token
Create a public token to use with embedded Deel SDK components.
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.TokenApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.letsdeel.com/rest/v2");
// Configure HTTP bearer authorization: deelToken
HttpBearerAuth deelToken = (HttpBearerAuth) defaultClient.getAuthentication("deelToken");
deelToken.setBearerToken("BEARER TOKEN");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
TokenApi apiInstance = new TokenApi(defaultClient);
CreatePublicTokenContainer createPublicTokenContainer = new CreatePublicTokenContainer(); // CreatePublicTokenContainer | Public token object that needs to be created.
try {
PublicTokenCreatedContainer result = apiInstance.createPublicToken(createPublicTokenContainer)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TokenApi#createPublicToken");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createPublicTokenContainer | CreatePublicTokenContainer | Public token object that needs to be created. |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Successful operation. | - |
401 | Operation failed. | - |
403 | Operation failed. | - |
404 | Operation failed. | - |
500 | Operation failed. | - |