mirror of
https://github.com/LukeHagar/clerk-sdk-java.git
synced 2025-12-06 04:19:25 +00:00
initial commit with code
This commit is contained in:
64
docs/sdks/testingtokens/README.md
Normal file
64
docs/sdks/testingtokens/README.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# TestingTokens
|
||||
(*testingTokens()*)
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [create](#create) - Retrieve a new testing token
|
||||
|
||||
## create
|
||||
|
||||
Retrieve a new testing token. Only available for development instances.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```java
|
||||
package hello.world;
|
||||
|
||||
import com.clerk.backend_api.Clerk;
|
||||
import com.clerk.backend_api.models.components.*;
|
||||
import com.clerk.backend_api.models.components.Security;
|
||||
import com.clerk.backend_api.models.operations.*;
|
||||
import com.clerk.backend_api.utils.EventStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Optional;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import static java.util.Map.entry;
|
||||
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
Clerk sdk = Clerk.builder()
|
||||
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
|
||||
.build();
|
||||
|
||||
CreateTestingTokenResponse res = sdk.testingTokens().create()
|
||||
.call();
|
||||
|
||||
if (res.testingToken().isPresent()) {
|
||||
// handle response
|
||||
}
|
||||
} catch (com.clerk.backend_api.models.errors.SDKError e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
// handle exception
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[Optional<? extends com.clerk.backend_api.models.operations.CreateTestingTokenResponse>](../../models/operations/CreateTestingTokenResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------- | ---------------------- | ---------------------- |
|
||||
| models/errors/SDKError | 4xx-5xx | */* |
|
||||
Reference in New Issue
Block a user