Testing an api through a GUI for client - api

My boss wants a GUI based api request sender - He initially asked for something already out there (so I don't have to build anything)
Anyone know of an online resource or tool that will allow you to, say, send 1000 requests over 10 minutes?

If you're talking about a web based API, take a look at Apache JMeter (http://jmeter.apache.org/)

soundcloud has a nice api console using apigee. http://developers.soundcloud.com/console

Related

Storefront event webhooks in Shopware 6 app development

I developing an app and basicly if an user loaded a product in the storefront it should send a request to my server. So i thought thats possible with webhooks. But unfortunately there is no webhook for this case.
The closest thing i could find is the product.written webhook but that seems useless for my case.
Anyone has an idea how i could realize my request?
I use Shopware 6.4.11.1 as development enviroment.
Although I have not found any appropriate webhook in the webhook events reference, this may be doable in a slightly different way, without using the Shopware App Webhook mechanic.
In the Shopware documentation there are shown ways to add Storefront scripts to an app. There is even an example for product-page-loaded. You would be able to execute some of your own code in there, but honestly I have not tried to ping external servers like this and I can't tell you that this will surely work.
You could also potentially add some custom JS code that pings your server with the appropriate info.
Unfortunately I don't think you can compel Shopware to send a request from its backend on a ProductPageLoadedEvent

API authentification token

I have recently learnt about API and started using them for learning purpose.
I have tried the twitter API,but there is something I don't understand
Process of sending tweets with an API
Get your API token (need to tell a lot of informations and wait some time before it's validated)
Make http post request with the token to 'https://api.twitter.com/1.1/statuses/update
Tweet posted successfully
Process of sending tweets with your browser:
Create an account (don't need that much information, it's instant)
Login, write a tweet
When you click on submit, a http post request is sent (to the same url that above) and there is a Bearer token in the request header
Tweet posted successfully
So that leads to my question, why should I contact twitter to have an API token, if I can have one just by creating an account ?
How do twitter back-end know that the request is coming from a browser (normal use) or if it's coming from a third part app ?
The direct answer to your question is that the only approved way (inside of the Terms of Service) of sending Tweets programmatically is to use the official API.
There are a variety of ways in which websites and web services can detect browser automation or usage, and that's not really a question for a programming community like Stack Overflow.
What exactly are you trying to do, and why would you choose not to use the supported official API?

Telegram bot authentification

A web service that contains all the methods for processing data is stored by Azure. In this case, only my telegram can process this data. Other applications are not allowed. But there is a possibility of expanding the service.
How do I know that the service is used by my telegram bot?
How to authenticate the application.
Well, I tried to use OAuth2.0, but i think it is not correct, because user is already authentificated with telegram, when he use telegram bot. My idea was to send a link to google auththentification in the beginning of bot job. By th way, ok, we know user`s data. May be I can check: Id, login etc. But some hacker can substitute this id
How can I make sure that Webhook requests are coming from Telegram? If
you‘d like to make sure that the Webhook request comes from Telegram,
we recommend using a secret path in the URL you give us, e.g.
www.example.com/your_token. Since nobody else knows your bot’s token,
you can be pretty sure it's us.
Telegram Bot FAQ

Browserless Authentication using the Web API

I am trying to authenticate a user inside a desktop application using the web api. I am not using a browser, I am using straight up GET and PUSH calls to the endpoints of the Spotify servers. Immediately I ran into some problems. It appears that upon the initial GET command to "accounts.spotify.com", the returned response includes HTML with a javascript function that runs and is responsible for dynamically generating HTML that you see on the initial login page. If you look at the Javascript function, it is clear that this is what is going on, however, you can also see this code is obfuscated and not meant to be used by us, the developers! (Link to Javascript code here for reference: Javascript function)
So my question is, while I can probably reverse engineer the code to get this working, would this be against the Spotify developer TOS?
Thanks!
Spotify's authentication happens through oauth, and a big part of user authentication as per the oauth rfc is where the user delegates permissions to your app to carry out API calls that affect their account, or return information about them. That's the web page you're seeing - it must be presented to your users so that they can delegate permissions so that Spotify can give your app an access token. It doesn't necessarily need to happen in a browser - it can happen in a web view inside your desktop application - but it does need to be loaded over https, and your application must not alter or reverse engineer the Spotify permissions delegations page.
As you correctly guessed, reverse engineering any Spotify APIs is against terms of service.
For more information on authorization on the Spotify platform, I'd recommend having a look at this guide.
Hope that helps! Please ping me if you have any more questions.
Hugh
Spotify Developer Support

Programmatically communicate with charles proxy server HTTP request and response

I am trying to develop an app which monitors data plan usage of other apps. As per the link
iPhone/iPad data usage tracking , I set up the proxy server Charles. Now I can see all the http request/responses of iPhone network traffic in charles. Now I need to write an app that can inspect the HTTP headers of these charles request/responses. How to do this programmatically in IOS(objective-C)? Please help!
I cannot add this as a comment (need 50 rep), and I understand that's it may not be exactly what you're looking for, but is the only way I have found to access sessions programatically.
You could write an app that utilises the Web Interface. I use it whilst running tests against my app to retrieve the session activity, then make assertions against the downloaded information retrospectively. Hope that helps.