Open s-lukashenka-micoworks opened 2 weeks ago
@s-lukashenka-micoworks The keys should be in the response after you call createApplication
. The only thing the SDK is doing, is adding the camelCasing
properties to the response. This means that you should have the private key under the keys
response:
const newApplication = await vonage.applications.createApplication({
name: 'my-awesome-app',
})
console.log(newApplication.keys.privateKey)
console.log(newApplication.keys.private_key);
LMK if you need any more assistance with this
@manchuck I understand that the actual API returns that parameter, but the types in SDK do not have it: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/applications/lib/types/Application.ts#L29. Could it be added, please? I can make a PR for that if needed.
@manchuck I have tried making a PR for the changes needed: https://github.com/Vonage/vonage-node-sdk/pull/956
Ahh, I can see the issue if you're using TypeScript.
How do I
If I am getting it right, a call to Create Account v2 API is supposed to return a private key alongside the public one, but in nodejs SDK it returns only the public one. Please, make it return the private key as well as that is important for application creation automation.
API/Product
Applications
Code Sample
API documentation pointing to its existence in the API response: https://developer.vonage.com/en/api/application.v2#createApplication-responses