API Web HTTP Request from DLE Vision Flow (Austria) - api

I have a question regarding with API Web HTTP Request of Vision Flow DLE Programm.
How can i read this code?
HTTP-Abfrage: http://api.test.de/address/v1/consolidate?includeDetails=true POST
$LOCAL:AdresseAPI(={"Name1": "Test","Name2": "Spedition GmbH","Name3": "", "Street": "Justus-Straße 8","CountryCode": "D", "ZipCode": "1xxx4","City": "BTESTIM"})
$respstat(=200)
See attached photo:enter image description here

Related

Twitter API authenticating failing

I have downloaded postman collection of Twitter API and set all the required keys in environment variables.
When I try to run following URL ,
https://api.twitter.com/2/tweets/search/all?query=%23haiku
I am getting following error in postman.
{
"client_id": "22929871",
"detail": "When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.",
"registration_url": "https://developer.twitter.com/en/docs/projects/overview",
"title": "Client Forbidden",
"required_enrollment": "Standard Basic",
"reason": "client-not-enrolled",
"type": "https://api.twitter.com/2/problems/client-forbidden"
}
For following API, I am getting response.
https://api.twitter.com/2/tweets/search/recent?query=%23haiku
Can someone suggest me, what I am missing.

Is there amadeus API endpoint for checking if service is up and running

I'm writing HealthIndicator actuator endpoint and would like to check if amadeus service is up and running.
Right now I'm sending GET request to https://test.api.amadeus.com/v2 but getting
"org.springframework.web.client.HttpClientErrorException$NotFound: 404 Not Found: [\n{\n "errors": [\n {\n "code": 38196,\n "title": "Resource not found",\n "detail": "The targeted resource doesn't exist",\n "status": 404\n }\n ]\n}\n ]"
Is there endpoint on Self-Service API to check that?
No, we don't have a way to check the health of Amadeus for Developers APIs. test.api.amadeus.com would test the API Management Platform but not the APIs we offer. https://test.api.amadeus.com/v2 is a base path, not an actual endpoint so you cannot call it. We plan in the future to publish a Status Page providing health information about our APIs.

How to get rabbitmq federation link status using rabbitmq HTTP calls

Does some one know how can I get the status of the federation links using the RabbitMQ's HTTP APIs? I am able to get the definition of the federation upstream by the following example, but can't find a way to get its status.
Call - http://[hostname]:15672/api/parameters/federation-upstream returns me
[{"value":{"uri":["amqp://USER:PASSWORD#HOSTNAME:4003/VHOST"],"trust-user-id":false,"exchange":"anurag.fed"},"vhost":"VHOST","component":"federation-upstream","name":"upstream-fed"}]
The official documentation says, the link status can be monitored by rabbitmqctl or GUI, but it does not mention HTTP apis anywhere. Does this mean that rabbitmq does not have this capability in APIs? If it has can someone please help?
https://www.rabbitmq.com/federation-reference.html
"You can monitor the status of federation links using rabbitmqctl and the management plugin."
RabbitMQ version being used: 3.6.8
Thanks,
Anurag
The RabbitMQ management UI uses REST calls to fetch data, and you have the ability to trace those calls:
Enable the rabbitmq_federation_management plugin. Via the web UI, browse to the page showing the status you're looking for. Then, open the developer tools in your web browser to trace the network requests and responses. You will see requests to various /api REST resources - one of them will be what you can use in your application.
NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.
You can call http://[hostname]:15672/api/federation-links which will retrieve a json which contains the status field, like this:
[
{
"node": "rabbit#hostname",
"exchange": "exchange_name",
"upstream_exchange": "exchange_name",
"type": "exchange",
"vhost": "/",
"upstream": "upstream_name",
"id": "blablabla",
"status": "running",
"local_connection": "<rabbit#hostname9>",
"uri": "amqp://hostname:5672/%2f",
"timestamp": "2019-03-15 13:57:57",
}

Twitter login POST request in Periscope API

I am trying to use Periscope API (https://github.com/gabrielg/periscope_api/blob/master/API.md) in my application. As in the API link I am trying to send POST request to https://api.periscope.tv/api/v2/loginTwitter?build=v1.0.2
with request body as following
{
"bundle_id": "com.bountylabs.periscope",
"phone_number": "",
"session_key": "<twitter_user_oauth_key>",
"session_secret": "<twitter_user_oauth_secret>",
"user_id": "<twitter_user_id>",
"user_name": "<twitter_user_name>",
"vendor_id": "81EA8A9B-2950-40CD-9365-40535404DDE4"
}
I already have an application in https://apps.twitter.com/ but I don't know what to use as twitter_user_oauth_key and twitter_user_oauth_secret. Can you help?
I must say https://github.com/gabrielg/periscope_api/ implementation is a bit complicated. Author using 2 sets of keys (IOS_* and PERISCOPE_*) when you actually need only one to access API. I didn't tried to broadcast but in my PHP library all other functions works without troubles with only what he call PERISCOPE_* set of keys.
You will get session_secret and session_key from Twitter after getting access to it as Periscope application.
So Periscope's login via Twitter process looks like
Request OAuth token via https://api.twitter.com/oauth/request_token
Redirect user to https://api.twitter.com/oauth/authorize?oauth_token=[oauth_token]
Wait for user login and get oauth_token and oauth_verifier from redirect url
Get oauth_token, oauth_token_secret, user_id and user_name via request to https://api.twitter.com/oauth/access_token?oauth_verifier=[oauth_verifier]
Send request to https://api.periscope.tv/api/v2/loginTwitter
{
"bundle_id": "com.bountylabs.periscope",
"phone_number": "",
"session_key": "oauth_token",
"session_secret": "oauth_token_secret",
"user_id": "user_id",
"user_name": "user_name",
"vendor_id": "81EA8A9B-2950-40CD-9365-40535404DDE4"
}
Save cookie value from last response and add it to all JSON API calls as some kind of authentication token.
Requests in 1 and 4 steps should be signed with proper Authorization header which requires Periscope application's consumer_key and consumer_secret. While consumer_key can be sniffed right in first step (if you are able to bypass certificate pinning) consumer_secret never leaves your device and you can't get it with simple traffic interception.
There is PHP example of login process https://gist.github.com/bearburger/b4d1a058c4f85b75fa83
Periscope's API is not public and the library you are referring to is sort of a hack.
To answer the original question, oauth_key & oauth_secret are keys sent by your actual device to periscope service. You can find them by sniffing network traffic sent by your device.

How to log external in .net web api 2

I'm trying to log in and register with external authentication using MVC5, web api 2 and templates from it.
I don't know how to do it. I read
asp.net web api 2: how to login with external authentication services?.
When I call
GET /api/Account/ExternalLogins?returnUrl=%2F&generateState=true
response is
{
"Name": "Facebook",
"Url": "/api/Account/ExternalLogin?provider=Facebook&
response_type=token&
client_id=self&redirect_uri=http%3A%2F%2Flocalhost%3A6685%2F&
state=Yj1...hU1",
"State": "Yj1...hU1"
}
(I don't know what is State for)
Then i can use the Url above (authentication is with cookies) and response is OK html status and some html page (i dont know why)
This call
GET /api/Account/UserInfo
response info with null loginProvider.
I want to register user with FB or Google, so i need token, but i don't know whitch access_token and how can i get it. In example (link above) is this:
POST /api/Account/RegisterExternal
Authorization: Bearer VPcd1RQ4X... (access_token from url)
Content-Type: application/json
{"UserName":"myusername"}
but what is
access_token from url ?
So, my questions are:
How can I external register / login with web api 2 templates?
What is State for? (seems like useless)
External login is Web Api is supported out of the box and can be easily plugged in using the Owin pipeline. Gettting the access token and performing all the oauth related calls are done by the Facebook Owin Provider.
You can find a sample of facebook login with a web site here