秘密を探る
これは一つの秘密の詳細を返します。シークレットの値は の値は決して表示されません。
| キー | 説明 |
|---|---|
VONAGE_API_KEY | Your Vonage API key (see it on your dashboard). |
VONAGE_API_SECRET | Your Vonage API secret (also available on your dashboard). |
ACCOUNT_ID | The account ID to target |
VONAGE_SECRET_ID | The ID of the secret to retrieve. |
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named get-api-secret.js and add the following code:
Run your code
Save this file to your machine and run it:
Prerequisites
Add the following to build.gradle:
Create a class named GetSecret and add the following code to the main method:
val client = Vonage {
apiKey(VONAGE_API_KEY)
apiSecret(VONAGE_API_SECRET)
}Write the code
Add the following to the main method of the GetSecret class:
val secret = client.account.secrets(ACCOUNT_ID).get(ACCOUNT_SECRET_ID)
println("ID: ${secret.id} created on: ${secret.created}")Run your code
We can use the アプリケーション plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.kt.account with the package containing GetSecret:
Prerequisites
Add the following to build.gradle:
Create a class named GetSecret and add the following code to the main method:
Run your code
We can use the アプリケーション plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.account with the package containing GetSecret:
Prerequisites
Create a file named FetchSecret.cs and add the following code:
Add the following to FetchSecret.cs:
Prerequisites
Create a file named fetch-a-secret.php and add the following code:
Run your code
Save this file to your machine and run it:
Prerequisites
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named fetch-a-secret.rb and add the following code:
Run your code
Save this file to your machine and run it: