(auth())
REST APIs for managing Authentication
- validateApiKey - Validate the current api key.
Validate the current api key.
package hello.world;
import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.operations.ValidateApiKeyResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
RyanTest sdk = RyanTest.builder()
.security(Security.builder()
.apiKey("<YOUR_API_KEY_HERE>")
.build())
.build();
ValidateApiKeyResponse res = sdk.auth().validateApiKey()
.call();
if (res.apiKeyDetails().isPresent()) {
// handle response
}
}
}
Error Type | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4XX, 5XX | */* |