适用于jypter笔记本的Watson Studio Translator API凭据

时间:2018-06-19 08:09:56

标签: watson watson-studio

我正在尝试关注教程,了解有关从笔记本调用API的更多信息。似乎教程指示不再与bluemix平台对齐,因为我应该提供翻译服务,然后从凭据中提取我的用户名和密码。由于创建的唯一凭据看起来像下面的凭据,有人可以告诉我如何找到用户名和密码吗?

{
  "apikey": "uK7Wv6hfKjTO_p56lhzZy302QmTZCyPI_FYFkqMLGOS0",
  "iam_apikey_description": "Auto generated apikey during resource-key operation for Instance - crn:v1:bluemix:public:language-translator:us-south:a/bff2d8201267d05e8b5580a56638c7a0:5eb84a08-7dd1-4a12-8385-b1eb043e1fcc::",
  "iam_apikey_name": "auto-generated-apikey-eb2957a2-f849-4f89-a830-2f6d688ec4a9",
  "iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Manager",
  "iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/bff2d8201267d05e8b5580a56638c7a0::serviceid:ServiceId-2588fac4-f9ea-4461-8e6c-be358855f9c7",
  "url": "https://gateway.watsonplatform.net/language-translator/api"
}

1 个答案:

答案 0 :(得分:0)

您是否遵循以下说明: https://www.ibm.com/watson/developercloud/language-translator/api/v3/curl.html ibm.com?如果您可以分享您的教程,那也可能会有所帮助。 (此外,您的问题公开了您的api密钥;建议您删除它并制作一个新的api密钥。)

以下是curl调用的示例:

curl --user apikey:{apikey} "https://gateway.watsonplatform.net/language-translator/api/v3/identifiable_languages?version=2018-05-01"

其中用户名是apikey,密码是实际的api密钥(用于curl)。这也可能会有所帮助: https://console.bluemix.net/docs/services/language-translator/getting-started.html#gettingstarted