Instead of creating an endpoint in an application and using that endpoint to create a subscription in a topic, Is it possible subscribe to a topic directly with the Registration Id. Also just want to know if it is possible to do it in PHP.
Please help me here.
It's not to possible subscribe an endpoint to a topic directly with the Registration Id (or token). You will first need to subscribe the device to an Application. You can then send direct pushes to the endpoints or subscribe them to your topics.
Note that "when you delete an endpoint that is also subscribed to a topic, you must also unsubscribe the endpoint from the topic", it's not unsubscribed automatically ~ http://docs.aws.amazon.com/sns/latest/api/API_DeleteEndpoint.html.
You can use AWS SDK for PHP to subscribe your endpoints to your topics, for more information, see http://docs.aws.amazon.com/aws-sdk-php/v2/api/class-Aws.Sns.SnsClient.html#_subscribe
AWS does not provide a way to do that automatically, but you can easily handle it in your code.
Take a look at this StackOverflow thread for more information and sample code in Objective-C: "You can directly call the Subscribe API after you have created your endpoint. Unlike other kinds of subscription, no confirmation is necessary with SNS Mobile Push".
Related
I am using the Paypal Subscription Button Html and Script provide by paypal. Now I wanted to link with paypal webhook. I want to track the events like BILLING.SUBSCRIPTION.RENEWED and BILLING.SUBSCRIPTION.CANCELLED.
Is this possible without using the App keys? When I created the App , I created with the same paypal-id so, that means my all webhooks in app is going get render when subscription event take place, without attaching any keys with it ?
Anyone there who can solve my query?
In order to receive Webhook events, you need to first subscribe to them.
For information on ways to subscribe to Webhook events for an application, see the PayPal documentation here.
It can be done via an API call, or via the Developer Dashboard.
I'm trying to work with the slack Event Subscription app_mention, but I'm having some issues.
My backend is PHP, and I'm using this class.
Basically, what's happening is, if I have my bot user in multiple channels and someone mentions the bot, it will only reply in a single channel.
For example;
I have the bot user in 2 channels
bot-testing
development
If I # mention the bot in the development channel, it will send it's reply in the bot-testing channel.
My code used to send the message:
$client->to('#' . $event['channel'])->send("Hi. I'm currently under development.");
and my $event variable looks like this:
{"type":"app_mention","text":"<#UFT4EG0Q7> test","user":"UAKTRFH41","ts":"1548783398.055200","channel":"GAMED4PK5","event_ts":"1548783398.055200"}
but decoded obviously.
Why is my bot not replying in the correct channel?
So based on my reading of the PHP client you're using, that's designed for use with Incoming Webhooks.
Incoming Webhooks have a 1:1 relationship with a conversation/channel, so you can't define the destination for your message in the payload you send to the API.
If you want to do that, you could try using one of the other PHP SDKs built by the community.
I am sending calendar meeting invitation to user's email.
When receiver accepts invitation then it appears in receivers calendar but I am not able to get response.
Is there any way that I can get response and use it in my website?
Google Service Account is the perfect solution in this case. In this, users do not need any API detail instead site owner needs API detail. Read Google service account documentation and you will find solution of your problem.
I've downloaded the PHP client library for Google Adwords API. I need to insert my login details in /src/Google/Api/Ads/AdWords/auth.ini. One of the variable is developerToken.
How can I get it?
Directly from the API...
Your assigned Developer Token will be activated once your application
for API access is approved. Your token will be available through your
AdWords API Center—accessible through the My Account menu for the MCC
account you applied with. You'll be able to access the API by
including it in your request headers when interacting with our system.
It is very important that you keep your Contact Email up to date—we
may send you important information regarding disruptions to service
and urgent changes via this channel.
https://developers.google.com/adwords/api/docs/signingup
I understand this might be old, but since Google updated their API, let me share my experience.
You need to create an MCC account (My Client Center), basically if you already have a Google Adwords account you cannot use it to generate developerToken however, you still can you use same Gmail account to create a new MCC account.
Follow below:
https://adwords.google.com/home/tools/manager-accounts/
Click on Start Now
Probably you are already logged in using your Gmail account, in all cases use your Gmail account in the email address field.
Choose name for your account let's say main-account
Do not click save and continue
Check below picture, you need to click, click here in the message below.
You will then redirect to the main dashboard, where you can click on Tools and then under SETUP tab you will find Adwords API Centre where you will be able to generate developerToken
you have to use the developer token from your live account. The token will work fine even if its status is pending
I'm reviewing a lot of scripts for sending messages to Twitter accounts.
I think you just needed your account authentication (to post in the headers) to be able to send a DM to any user. Is it possible you can't do that now ?
I'm just finding examples with oAuth, but I don't need that.
What I want is to send a DM each time someone follows me, but with all oAuth examples and scripts, they use a Twitter APP, so other users "connect their accounts" to my App, but I don't want that … that is for websites and similar to "connect with Facebook" .
I need just to send DM to some users. How can I do that avoiding them to "connect to my app" ?
Thank you !
You will need to create an API key (an app, if you prefer) and then give access to this app from your own account. It will then be possible to DM people as yourself using the authentication token your app receives.
The recipients of the DMs do not need to interact with your app at all.
if you simply want to DM them on being followed check out ITTT.com 's features.
it will automate this process for you.
and it's free