List API Versions
Returns a list of all available API versions for the account. Use this endpoint to discover supported API versions and determine which version to use for your integration.
Request Parametersโ
No parameters required for this endpoint.
Responsesโ
200
Successful requestReturns a list of available API versions with details about each version.
Response structure:
object- Always returns "list"data- Array of API version objectslocation- API endpoint URL
object- Always returns "api_version"name- Version identifier (e.g., "2019-05-29")current- Boolean indicating if this is the account's current default version
401
UnauthorizedAuthentication failed. Invalid or missing API key.
Common causes:
- Missing Authorization header
- Invalid secret key
- Using public key instead of secret key
- Incorrect HTTP Basic Auth format
5xx
Server errorServer-side error occurred. These are rare but should be handled gracefully.
How to handle:
- Retry the request with exponential backoff
- Check status.omise.co for service incidents
- See Error Handling for detailed guidance
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/account/api_versions \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
api_versions = Omise::Account.api_versions
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
api_versions = omise.Account.api_versions()
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const apiVersions = await omise.account.listApiVersions();
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$apiVersions = OmiseAccount::apiVersions();
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
ScopedList<ApiVersion> apiVersions = client.account().apiVersions().list();
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var apiVersions = await client.Account.ListApiVersions();
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
apiVersions, _ := client.Account().ListApiVersions()
API Credentials
Try it outโ
Your IP:
...Loading...