What are the possible status values when using delivery notifications? - clickatell

I am setting up integration with a new Clickatell account. Our old account posts statuses like 003, 004 etc. They can be found here https://archive.clickatell.com/developers/api-docs/message-status-codes/
The new account seems to post statuses like this 'DELIVERED_TO_GATEWAY'. Is there a list of the possible statuses somewhere?

Related

Add unique key of my own to slack event requests

I created a slack app with distribution (multiple clients)
and I subscribe to events several events like a message posted in a channel.
Beside the team_id field for identifying the client team - is there an ability to put my own key for a client?
Thank you.
No, Sack does not store any custom data for you. Its your job as an app developer to store all team related information for your app and link it to the Slack team_id. This is usually done with a database.
You can however include custom IDs with Slack requests, e.g. in the response you get from an interactive message. See this answer for more details on how this works.

Pass a unique ID with Twilio HTTP POST

I am currently using Twilio to send balance notifications for customers who have opted into SMS notifications, but have run into an issue in positively identifying accounts in the message logs. A number of customers have multiple accounts due to the nature of my industry, but naturally use the same phone number across all accounts. Is there any way to pass a parameter containing their internal account ID in the HTTP POST request without including it in the message body? I've searched extensively through Twilio's API docs and cannot find this addressed anywhere.
Twilio developer evangelist here.
As far as I know there is currently no way to store metadata, like your account ID, within an SMS sent via Twilio.
One idea could be that you purchase a number of Twilio numbers and tie together a user's phone number, a Twilio phone number and the specific account. That way, if you always send balance notifications for a specific account from a specific number then you can identify that message in the logs as belonging to that user phone number for that account.
Alternatively, I'd have thought it would be useful for users, if they have more than one account, to see to which account you are referring in a balance notification. Would it be possible to include the account id (or some other identifier that the user would recognise) and then parse that out of the message when reconciling messages and accounts?
Not exactly the question but if you are using twilio webhooks for status callbacks you can pass query string params through the status_callback parameter when making the call to send the SMS message and get it sent to your endpoint

How to check if user subscription is up to date?

I create new customer with credit card using gateway.customer.create
I create new subscription for a customer using gateway.subscription.create
Now when my application starts I have to check if customers subscriptions is still valid. Is there any api endpoint that will allow me to do this?
I am looking for example for a method like this:
isUserSubscribed(customerId)
Maybe also something to get info in which plan user is subscribed (silver,gold,etc)
I work at Braintree. If you have more questions, feel free to reach out to our support team.
When you get a customer from Braintree, you get all of its credit cards and subscriptions:
customer = gateway.customer.find(customerId)
subscriptions = customer.credit_cards.flat_map(&:subscriptions)
You can then look at the customer's subscriptions to find any info you need.

Yammer API Find Pending Users

Is it possible to find a list of Yammer users in the 'pending' state using the API?
(we have a growing list of old invites that need to be purged regularly)
Tried a number of options:
The find all users endpoint, paging to 50 per page seems to only return 'active' users (scanned 100+ pages).
https://www.yammer.com/api/v1/users.json
The find by email endpoint returns all user states, although requires knowing the email.
The export users API endpoint produces a .zip file
Pending users were recently added as mentionable:
https://about.yammer.com/yammer-blog/mentioning-pending-users-designing-building-testing-features-yammer Should this recent change have also made pending users visible via the users.json endpoint ?
I know pending users can be identified in the manual user.csv extract by having no join date, no deletion and no suspended date, although how can they be identified via the API? users.json seems to not provide this functionality.
Has anyone been able to automate the deletion of pending users in Yammer via the API?
You can use the Data Export API. Extract the users.csv from the ZIP file using code and then filter for pending users. Pending users do not have a joined_at, suspended_at, or deleted_at date.
NOTE: If you are intended to "remove" a pending user, you must always check if that email address also has an active user associated. An email address can show up multiple times in users.csv. When you do remove a user always suspend the user because it can be undone.
Here's an endpoint you can run a GET on an return the JSON output of the pending user list:
https://www.yammer.com/<your Yammer network>/contacts/network
Example:
https://www.yammer.com/contoso.com/contacts/network
Note: this is an undocumented endpoint so the functionality could change at any time.

Google Checkout subscription: How to identify the user

We are using Google Checkout - google handled subscriptions. In our html form we are using merchant-item-id parameter to store the subscription plan id and user id, so when Google Checkout send us back the notification for the new orders (merchant-item-id is there) we know what user for what plan to charge. So far this works perfect.
But now, when a month is passed, and Google Checkout start creating the reoccurring orders, there is no merchant-item-id parameter in the notifications they send. So we don't know what user for what plan is charged.
What should we use as user identifier, so we can handle properly the subscription on our site?
Any ideas?
Btw. I know about the "buyer-id" parameter which is send with each new order notification, but that will not work for us, because it is possible that the same google buyer is paying for several of our users accounts.
I would try putting some unique info in "shopping-cart.items.item-1.merchant-private-item-data" to something unique that I can identify the subscription by.
Nikolaj

Resources