How to use houndify API with curl - houndify

I just want to test houndify API simply by curl application.
But I can't find how can I use it.
If I send text or voice recoded file to houndify by curl application in windows(linux) pc, could you let me know full option for curl?

I would highly recommend using an SDK to do your requests. These SDKs allow for streaming of audio, have code examples, and take care of many things including authentication.
https://www.houndify.com/sdks
If you really want to use cURL or write your own SDK, you can find more details about the required fields here, but this would require calculating the authentication headers yourself.
https://www.houndify.com/docs/advanced#basics-of-a-houndify-api-request

Related

How to work in Laravel app with external api?

in my Laravel 5.7/mysql app I need to make external api to read some data from external
app with get request and to write some data to my db with post request.
Which tools/scripts are there for this and how to make these requests safe?
MODIFIED :
Thanks for feedbacks, but looks like I badly put my question
The external app(I do not know what is it written with) need to read data from my app
and write data to my Laravel 5 app.
And how have I to test these requests while on development locally ?
Looks like I have to use Guzzle as in provided link?
Which steps have I to take for safety on my side?
Thanks!
These three libraries are popular for your use-case:
Guzzle
Curl
zttp
If the database is local you can use Eloquent, If not, remote connection to that database may help. otherwise, if you only have API access you should consume eighter of above libraries or any alternative options to make an HTTP request your application might require.
Security-wise, as long as you are only making a request to a remote server, the Suggested way is to store any key or secret string related to authorizing your request (if applicable) in your .env to prevent it from committed to your version control systems. Needless to say to always handle any possible HTTP error your remote API might throw in order to prevent any unwanted error on your application side.
And as Abir Adak mentioned in the comment check this thread for further details.
Updated Answer: On the case of MODIFIED part, generally you have 3 popular options,
REST API
This blog post is a detailed walkthrough written for Laravel
This one from Stack Overflow can help you with designing you API
This last one can help you to develop a widely accepted API response and endpoints by following its specifications.
GraphQL
Can save some time for developing your API, but I suggest to make sure that the consumers of your API are happy to use this option.
GraphQ
Laravel Package for GraphQL
If using Laravel isn't a must, and you are using PostgreSQL, you might want to look at Hasura as well.
SOAP
Have little knowledge on this option for Laravel, just know folks coding using C# and .net are happier to expose their API with this protocol. read more about it on WikiPedia
Postman is a great tool for testing your API or any other API.

Gmail Api Mail Read Reciept

Is there a way to way to get read receipt of sent mail?
Like which mail is read and which one is unread?
Using google apis Rest.
Read Receipt is no available in current version of google mail api.
provide third party solutions.
As of now Read reciept is not available.
but you can always write custom code to implement task.
Well, if you check the Gmail API documentation you cannot find any guides here that can achieve this. I found here a related SO question that try to use Apps Script in achieving this, but it seems that the Apps Script is also not applicable. I suggest you to file a feature request about this if you still want to do it with the Gmail api.

Google Speech Recognition API

I'm trying to use the Google Speech API v2 (at address https://www.google.com/speech-api/v2/recognize?...)
I need to use my Api Key, but when I use it I get error 403 Forbidden
When I use an API key that was on the example project I downloaded it is working fine.
I saw that at the Google Developers Console I can enable a lot of api options, but didn't find any Speech-API option. Is there anything else I need to enable to get access to this API using my key?
Thank you!
Instructions are here : http://www.chromium.org/developers/how-tos/api-keys
!! Do not forget to activate the API "Speech API" in "APIs" under "APIS & AUTH" !!
According to chromium that there is no quota for google speech to text APIs anymore.so you will not found it in your google cloud project console
I am not sure this API is available to everyone, but here is a github project that provides a valid key. You should try with this key.
https://github.com/gillesdemey/google-speech-v2
This is an old post, but hopefully it will help someone.
I couldn't find the Speech API listed under the popular APIs on https://console.developers.google.com/ either. You have to search for the Speech API using the "Search all 100 + APIs" search field.
In order to use the service you need to:
get a developer key (see above answers for instructions)
send a mono flac audio file to http://www.google.com/speech-api/v2/recognize (Google doesn't accept stereo audio anymore)
specify your audio file's sampling rate (e.g. 16000, 44100, etc.) and Content-Type as audio/x-flac in your HTTP header
specify values for key, client and lang parameters in the url
Here is a wget example with full parameters and header:
wget -q --post-file file.flac --header="Content-Type: audio/x-flac; rate=16000" -O - "http://www.google.com/speech-api/v2/recognize?client=chromium&lang=en_US&key=AIzaSyAcalCzUvPmmJ7CZBFOEWx2Z1ZSn4Vs1gg"
Note that the free service is limited to 50 requests/day for a developer key.
This repository offers a shell script to use the API from the command line (including voice recording).

Can Facebook's Graph API be used without using any SDK?

Can the full functionality of the Facebook Graph API be used with HTTP Requests, rather than using any of the SDK's? I've been able to use a GET requests to return public data; I've been able to use a POST request to make a post with an access token retrieved from Facebooks Graph API Explorer, but I'm not sure if Login, getting Access Tokens and determining whether a user has given permissions, is possible without using one of the SDK's? I could spend the next 2 days using trial and error, and reading docs to try to find out, but I'd hate to waste a couple days going down a road to nowhere if someone can just give me the answer now.
Yes, absolutely you can create application for Facebook without using any SDK..
SDK is just a software development kit (SDK or "devkit") it's typically a set of software development tools that allows for the creation of applications for a certain software package,
Facebook SDK made your work much easier because they give you ready made functions to call Facebook API
like PHP sdk ,C# sdk.. etc
If you want to create application without using it .. then you have to request Facebook Graph API directly ..
For e.g you need to get page information using JS SDK ..you need to pass only name/id of the page
in JS SDK
FB.api('/cocacola', function(response) {
console.log(response);
});
but if you want to go without SDK, then you need to call http://graph.facebook.com/cocacola
now you need to parse JSON then retrieve data based on the language you're working on

how to call a Google API

I read the following two pages on Google:
1) https://developers.google.com/google-apps/documents-list/#getting_a_list_of_documents_and_files
and
2) https://developers.google.com/accounts/docs/OAuth2WebServer
I can go as far as getting an access_token (OAuth2) to be used in a subsequent Google API call (I want to call Google Docs Listing or Google Drive).
I wanted to use curl or something similar and just form my https URL.
- As such in the 1st document states to form a URL as follows:
https: //docs.google.com/feeds/default/private/full
- In the 2nd document, the example states to use something like https: //www.googleapis.com/oauth2/v1/userinfo?access_token=xxxxx
(adding the access token to the call)
Several questions
- Do I call googleapis.com or docs.google.com?
- can I call https: //docs.google.com/feeds/default/private/full?access_token=xxxxx
just add the access token to the call?
thanks
You need some effort to approach a Google API the first time, but then it's easy and elegant:
Manual preparation (One-time action): Sign in to Google, create a project, enable the API in question, create new Cient ID.
Get OAuth code, refresh token and access token (one-time action).
Make the API call (repetitive arbitrary actions).
Here is a detailed explanation of the entire process - Steps to make a Google API call.
A practical sample based on the Google Calendar API with full demo code in a single HTML file can also be reviewed here - Easy and compact access to my Google calendars.
The fastest way to get started is probably the quickstart guide for the Google Drive API, which shows how to setup your environment and write a complete command-line app to upload a file to Drive:
https://developers.google.com/drive/quickstart
Hie you can go through the Google Docs Sample Available Here
it's a command line smaple but this same thing you can implement in android. it works for me. you will find "docs-cmdline-sample" in repo. that will help you.

Resources