如何为现有的 nexmo 应用程序创建用户和 link?

How to create user and link to existing nexmo application?

是否可以使用 vonage-php-sdk-core 包为现有应用程序创建用户和 link 用户? https://github.com/Vonage/vonage-php-sdk-core

我可以使用 Vonage CLI 创建应用程序和用户,但我需要使用 PHP。有办法吗?

nexmo app:create "My Sample App" --capabilities=voice,rtc --voice-answer-url=https://example.com/webhooks/answer --voice-event-url=https://example.com/webhooks/event --rtc-event-url=https://example.com/webhooks/rtc --keyfile=private.key

使用 vonage-php-sdk-core 我也可以制作应用程序,但似乎找不到创建用户的方法。

对话 API(包括用户、成员和对话)目前在 PHP SDK 中不受支持,因为 API 仍处于测试阶段。一旦 API 全面上线,我们将在 NodeJS SDK 以外的 SDK 中支持它。

SDK 中有一些 Conversation 和 User API 的痕迹,但我们已将它们标记为已弃用,因为它是 API 的旧版本。

目前您应该使用 Guzzle 或您正在使用的任何 HTTP 客户端访问 APIs(如果您没有指定客户端,我们应该从 Laravel 中引入 Guzzle)。

至于直接使用 API、https://developer.nexmo.com/conversation/overview is the entrypoint for the Conversations API. General API documentation is available at https://developer.nexmo.com/api/conversation, and demo code from cURL, which can be useful for seeing URL structures as well as payloads, is available at https://developer.nexmo.com/conversation/code-snippets/user/create-user/curl

为什么我们不支持这个 API?

通常,我们不会在我们的稳定版 SDK 中添加对 beta APIs 的支持,因为这可能会导致许多具有重大更改的主要版本,因为 beta APIs只有 6 个月的稳定性 SLA,并且可以快速更改。我们正在寻找更好的方法来处理我们的 beta APIs(PHP SDK 现在支持 v2.2.0 的模块系统),以便开发人员可以访问这些类型的 API速度更快。