Using WhatsApp API to find out if a number has an account - api

I'm trying to use the WhatsApp API, especially "POST /v1/contacts" at this url "https://developers.facebook.com/docs/whatsapp/api/contacts/".
But actually I don't know which url to use, I tried "https://api.whatsapp.com/v1/contacts" but I got a 404 Not Found Status.
I do my queries on postman.
Has anyone ever used it.
Thank you.

To achieve your goal, you'd need to try a different method because the API you're trying to call is not a public API, it's a private API.
Access private API is only available to verified Whatsapp for Business accounts.
It's Whatsapp For Business service provider you choose and successfully applied for.

Related

How to integrate Google business messaging through API

Problems:
I am unable to enable Business Messages API, Because "Business Messages API" is not showing API list, While i am going to enable the API through the
https://console.cloud.google.com/apis/dashboard
I want to use auth token, while hitting the API, but the document is saying use the service.json for the credentials. i am following these doc. I am using "Google\Client()" with Laravel application.
https://developers.google.com/business-communications/business-messages/guides/how-to/agents?method=api
I am following these steps:
Login with google business account in the Dashboard
App taking multiple permissions as I have attached the permissions list and taking the auth token.
Open the chat box for the Business.
So please guide me, where i am going wrong. What is correct way to implement this.
Requirement:
I want to create a custom chat box for google businesses, Where business owner will login into the web app and He can easily manage the multiple business chats in one dashboard.
As per your given information, you have to be a partner of Google. As per google documentation, you need to be a partner of google and then you can create the agent and can send and receive messages. You can integrate the business messages API by following this documentation:
https://developers.google.com/business-communications/business-messages/guides
In this process, you need to be a partner of Google. The complete process is given on the link. If you follow this link, then you can use their built-in libraries easily and can send messages easily.
So far the permission for API, it might not be found for you because you might have to take permission for the particular project that is registered on google and then you will see the business messages API and you can enable it and use it. The reason as per the basic step:
https://developers.google.com/my-business/content/basic-setup
Sometimes, you have to submit the request form to take the API access for particular APIs. Or Share how are you using that API.
If you do not find a form for business messages API then you can ask for the information from bm-support#google.com. they mostly respond on a working day.

Query discord api from webiste

Is there a way to query the discord API without have a bot on a server.
I would like to retrieve my friends and my profile images and put it on a website I created.
I've done some research and only found stuff for discord bots.
Is what I want even possible ?
Yes, this is possible.
Take a look at this API route. You can just make a request there with the user id and get the whole user object.
If you need more information on the API itself and how to use it check out the Discord API Reference

API to check Periscope User is Online

I've scoured for any information regarding an Open API for Periscope.
I have a twitter feed, that should only show if Periscope is Live (the said user will share the broadcast via Twitter).
I can parse the word "IS LIVE" but then I'd have to parse multiple languages.
I'm looking to check an API if the user is Online in periscope, if so, then display the latest twitter feed (which is the broadcast).
There was this User Online button that could be generated
https://www.periscope.tv/embed
it calls an api like https://embed.periscope.tv/user/bpsdmik.json
but it seems that the certificate is invalid, so I keep getting errors ..
Any help / workarounds would be much appreciated!
I've Searched OPEN Periscope, but mostly requires an Authentication token etc.
There is no open API for Periscope. At least, not that I'm aware of. Which would explain your difficulty in finding anything. The closest thing would be the Unofficial Periscope API, documented by Pmmlabs (the same folks who run the OpenPeriscope project). However, as you've already discovered, most of the calls to the Periscope API, including all user-related calls, require an auth token.
Outside of using the API or screen scraping, the only other way I can think of to tell if a user is live or not is to try accessing their Periscope page directly. When you go to a user's Periscope page at https://www.pscp.tv/{userId}, Periscope will redirect you to that users most recent broadcast, where you can parse the broadcast id from the redirect URL. Once you have the broadcast id of the most recent broadcast, you can use the following API call (which does not require an auth token):
https://api.periscope.tv/api/v2/getAccessPublic?token={broadcastId}
... to determine whether the broadcast is live or not. Look at the JSON response and if the "type" field equals "StreamTypeReplay", then it's a replay, otherwise it's a live broadcast.

How to send Trustpilot invitations through Trustpilot API?

In our app we are using this API call to retrieve our average rating score and display it on our website:
https://api.trustpilot.com/v1/business-units/{{BUSINESS_UNIT_ID}}/?apikey={{API_KEY}}
This works great.
Now if we want to send an invitation to rate our services to one of our customers, we use a very similar API call:
https://invitations-api.trustpilot.com/v1/private/business-units/{{BUSINESS_UNIT_ID}}/invitations?apikey={{API_KEY}}
Unfortunately, this doesn't work. We are getting this error:
{"fault":{"faultstring":"Invalid access token","detail":{"errorcode":"oauth.v2.InvalidAccessToken"}}}
What are we missing here?
We can't see why our API key works for the first call, but not for the second.
Thanks for any help.
In the first API call you are calling a public endpoint. For all public endpoints API key is enough because you are not accessing restricted data.
For your second API call (the invitations one), you are calling a private endpoint.
For all private APIs you need to authenticate yourself using the OAuth2 flow and include the access token in your request.
You can read more about the flow at:
https://developers.trustpilot.com/authentication

How to Integrate Google+ API iPhone

I am working on an iPhone application in which i have to implement Google+ API for login and fetching user details.I have used the API for it from this link https://developers.google.com done everything but immediately after login I am getting an error invalid scope.I don't know what i am missing out.Please let me know how to acheive this.
Thank you.
To access certain stuff on behalf of the user, we need to tell google that we are looking for such information (Access calendars, google+ etc).
The way to tell this to google is by defining scope. For google plus use
#"https://www.googleapis.com/auth/plus.me"
Refer to the SDK where to pass in the scope. Also make sure that you enable Google Plus in the Google API Console.