PushBullet API验证? [英] PushBullet API Auth?

查看:425
本文介绍了PushBullet API验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用PushBullet API,但我有我的验证API密钥,主要是因为我不知道如何正确地做一个POST到API的一些问题吧。

I am trying to use the PushBullet API but I am having some problems with it authenticating my API Key mainly because I am not sure how to properly make a POST to the API.

我试着在网上研究,但我找不到-u的意思。这是否意味着它应在页眉或拆开的数据去?

I tried researching online but I couldn't find what -u means. Does this mean it should go in the header or apart of the data?

curl https://api.pushbullet.com/api/pushes \
      -u API_KEY: \
      -d device_iden=u1qSJddxeKwOGuGW \
      -d type=note \
      -d title=Title \
      -d body=Body \
      -X POST

我试图做一个邮差,像这样(我挡了出来,其中的关键设备和GO):

I tried to do a Postman like so (I blocked out where the key and device go):

我在做什么错了?

推荐答案

我想通了,我需要授权添加到头部。然后在头我使用的密钥作为用户名。现在,所有的工作!

I figured it out I needed to add Authorization to the header. Then in the header I used the key as the username. All working now!

这篇关于PushBullet API验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆