尝试通过我的Android应用程序连接到Facebook以进行状态更新.得到了整个事情,但我需要API密钥+秘密.我在哪里可以创建/获取这些?
private static final String apiKey = "<YOUR API KEY>";
private static final String apiSecret = "<YOUR SECRET KEY>";
Run Code Online (Sandbox Code Playgroud)
用Twitter尝试了同样的事情,然后我只是"创建"了一个应用程序并收到了"ConsumerKEY"和"ConsumerSECRET",但Facebook的交易是什么?
我在这里搜索了与同一主题相关的其他问题,但找不到明确的答案.
我的问题似乎与许多其他人一样,因为我无法从Google Places Api获得回复.
我在iphone应用程序中尝试,是的,代码是正确的,我已经检查过并且绝望地只是使用Google Places上的文档提供的示例来消除代码.
尝试将网址放入浏览器,始终使用相同的响应,无论哪个浏览器.
{
"html_attributions" : [],
"results" : [],
"status" : "REQUEST DENIED"
}
Run Code Online (Sandbox Code Playgroud)
我尝试制作新密钥,结果相同,是的,也列出了应用程序的标识.
是否有时间框架才能使用密钥.
我刚创建了一个用于我的网站的API密钥,地图将只显示它所在公司的位置.
但不知何故,地图已加载,然后自动刷新并在js控制台中显示ExpiredKeyMapError.
你知道它可能是什么吗?
PS:我试图从其他帐户重新创建它,并从网址生成中删除任何非谷歌参数,但仍无法正常工作.
页面是:https: //corporativo.androsol.com/contact/
谢谢你的帮助!
这是我第一次尝试使用API.我按照注册Edmunds API(http://developer.edmunds.com/)的说明进行操作.我注册了一个帐户,收到了他们的电子邮件确认,点击了该链接,并收到了我填写的申请.但是当我登录我的帐户并点击"密钥"时,我得到的是"你还没有任何密钥"的消息.
我错过了什么?提前致谢.
我想要一个HTTP头到我的WCF SOAP服务.我的最终目标是通过此HTTP标头发送API密钥.
以下是我的代码:
[ServiceBehavior(Namespace = "http://****.com/**/1.1")]
public class MyWcfSvc : IMyVerify
{
const int MaxResponseSize = 0xffff; // 64K max size - Normally it will be MUCH smaller than this
private static readonly NLogLogger Logger;
static MyWcfSvc()
{
Logger = new NLogLogger();
// Add an HTTP Header to an outgoing request
HttpRequestMessageProperty requestMessage = new HttpRequestMessageProperty();
requestMessage.Headers["User-Auth"] = "MyHttpHeaderValue";
OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = requestMessage;
}
}
Run Code Online (Sandbox Code Playgroud)
我没有User-Auth在HTTP请求标头下看到标头.
我也尝试过另一种方式.
public AnalyzeResponse Analyze(AnalyzeRequest analyzeRequest)
{
HttpRequestMessageProperty requestMessage = new HttpRequestMessageProperty();
requestMessage.Headers["User-Auth"] = …Run Code Online (Sandbox Code Playgroud) 使用请求包调用下面的 REST API 的 python 代码应该是什么?我不知道如何通过“apikey”
curl -X POST -u "apikey":"1234abcd" -H "Accept: application/json" -F "file=@{input_file}" https://api_url
Run Code Online (Sandbox Code Playgroud)
感谢您的帮助。
我正在尝试创建一个使用 google translate api 的 Node.js 代码。我从 google doc ( https://cloud.google.com/translate/docs/translating-text )得到以下代码
但是当我运行它时,它说“错误:请求缺少有效的 API 密钥。” 我有钥匙,但我不知道如何以及在哪里设置它。
async function translate() { // Imports the Google Cloud client library
const { Translate } = require('@google-cloud/translate');
// Creates a client
const translate = new Translate();
/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
const text = 'Hello, world!';
const target = 'ru';
// Translates the text into the target language. "text" can be a string for
// translating a …Run Code Online (Sandbox Code Playgroud) Java 11、Spring Boot 2.1.3、Spring 5.1.5
我有一个 Spring Boot 项目,其中某些端点由 API 密钥保护。目前使用以下代码可以正常工作:
@Component("securityConfig")
@ConfigurationProperties("project.security")
@EnableWebSecurity
@Order(1)
public class SecurityJavaConfig extends WebSecurityConfigurerAdapter {
private static final Logger LOG = LoggerFactory.getLogger(SecurityJavaConfig.class);
private static final String API_KEY_HEADER = "x-api-key";
private String apiKey;
@Override
protected void configure(HttpSecurity httpSecurity) throws Exception {
APIKeyFilter filter = new APIKeyFilter(API_KEY_HEADER);
filter.setAuthenticationManager(authentication -> {
String apiKey = (String) authentication.getPrincipal();
if (this.apiKey != null && !this.apiKey.isEmpty() && this.apiKey.equals(apiKey)) {
authentication.setAuthenticated(true);
return authentication;
} else {
throw new BadCredentialsException("Access Denied.");
}
}); …Run Code Online (Sandbox Code Playgroud) 我正在尝试删除电报 api_key 和 api_hash,或者至少重置 api_hash。
但是我在此页面中找不到执行此操作的选项https://my.telegram.org/apps。
有谁知道如何删除或重置电报api应用程序的api_hash?
在 ac# 程序中,我想使用api 密钥调用我的vertex ai 端点进行预测(通过“Google Cloud”/Credentials/API Keys”))。我向 api 密钥授予了对 Vertex AI 的访问权限,并作为测试其他所有内容。
使用curl 或c# 调用它时,我收到错误消息,该服务需要“OAuth 2 访问令牌”或其他内容。
CURL: curl -X POST -H“apikey=..mykey...”-H“内容类型:application/json”https://.....googleapis.com/v1/projects/[PROJECT_ID]/位置/europe-west4/endpoints/[ENDPOINT_ID]:predict -d @image.json
错误: “错误”:{“代码”:401,“消息”:“请求缺少所需的身份验证凭据。需要 OAuth 2 访问令牌、登录 cookie 或其他有效的身份验证凭据。...}
我的问题: 有没有办法使用 Apikey 对 vertex ai 进行身份验证?
api-key ×10
c# ×2
android ×1
api ×1
curl ×1
facebook ×1
google-maps ×1
java ×1
javascript ×1
keyboard ×1
node.js ×1
soap ×1
spring-boot ×1
tdlib ×1
telegram ×1
wcf ×1
web-services ×1