API call to link a number to a 10 DLC campaign - vonage

I buy numbers and set up callbacks on them through the Vonage API without any problems. Now, however, I am required to link every new number with a 10 DLC campaign. Do I have to resort to the console to do this, or is there an API call that will do the job? I've searched the API documentation without success.

Related

Twilio Rest API / Node Js call status no working

I'm creating a tool that can automatically call someone when I click a button.
So far, I've tested three solutions: The first one was using the rest API call, the second one was using node js SDK that is available in the Twilio console using the function & assets feature, and the last one was using Twilio Studio feature.
All of them are not giving me the satisfaction of creating something that can be used in production.
The main problem is the call status given to the StatusCallback url parameter.
For example:
if you set a timeout value by default or something higher than the duration of the ringing time, it will send you a completed status. The timeout value needs to be smaller than the maximum number of ringtone that your carrier set by default if you want to receive a no-answered status.
If your phone is on "airplane mode" and you make a call to it using Twilio, the statusCallback will be sent to the URL as "completed".
If you make the same phone call and imagine that the user rejects the call by clicking on the red phone instead of the green phone, the statusCallback will send you a completed status.
So it's been a week since I've coded a NodeJS solution using Twilio Functions, making POST requests using Postman, and also creating a flow to test it using Twilio Studio. Every time that I've tried those three solutions, with the three same scenarios described above, I've never been able to obtain a real valuable/informative status that can help me to resend the call until someone answers or, based on the status, send an SMS to the person to inform him that we have tried to call him and that he either was not available or rejected the call.
Has one of you already tested that and maybe succeeded in having anything else than a "completed" status? That is no use in case you need to handle those cases.
Thank you for your help.

Instagram Graph API - media_product_type not showing STORY

I currently have the below API response for one of our instagram pages using the Graph API that includes media_product_type, even though our Page has a STORY we are not seeing it come through, but we do see FEED and IGTV, see here for the documentation on this field. Has this happened to anyone else?
/12334555/media?limit=100&period=lifetime&fields=name%2Ccaption%2Clink%2Cshortcode%2Ccomments_count%2Cmedia_type%2Cpermalink%2Clike_count%2Ctimestamp%2media_product_type&access_token='blah'
You will need to use the stories endpoint (not media)
eg:
{baseUrl}/{version}/{instagramUserId}/stories?fields=caption,media_url,timestamp,permalink,username,media_type,like_count,comments_count,shortcode,thumbnail_url,video_title,media_product_type&limit=10&access_token={accessToken}
Note: story info is only around for 24 hours, so ideally you polls for infor and then setup the webhook to receive the final counts before the story dissapears.

Does the DocuSign Intermediate API plan let me use the API to get PDF and form fields?

I tried calling DocuSign sales and support (transferred around 3 times) and no one could give me a straight answer on this. Their "support" actually told be to try stackoverflow, so here I am...
I'm looking at their API pricing levels here: https://www.docusign.com/products-and-pricing/api-plans-b
If I have the Intermediate API, can I make the following API requests?
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/form_data
The part that's throwing me for a loop is the DocuSign Connect feature in the Advanced API plan. The description of it is:
The DocuSign Connect module lets you configure webhooks for envelope events and recipient actions for some or all users in your account. It can also be used to transport the completed documents back to your app or website and to retrieve any form field data entered by your recipients.
I don't need the webhooks, but I need to be able to get the completed documents as PDFs and get the form field data. Do I really need the DocuSign Connect feature for that?
You will be fine with the intermediate plan. Here is the basic distinction between polling and Connect - With Connect, we will proactively notify YOU when key envelope events occur.
Otherwise, it's up to you to call GET /envelopes and/or GET /form_data to retrieve that information. Be wary of the resource limits when you poll.
As a quick aside, instead of making two requests to retrive that information, just make one - GET /envelopes?include=recipients,tabs. This will provide you all the information you seek in one request.
The important excerpt from that guide:
You may not exceed one GET request per unique envelope endpoint per 15
minutes. If you exceed this limit the request will not fail, but it
will be flagged as a violation of rate limits which can cause your app
to fail review to go-live review.
For example, the following transactions violate API rules due to the repeated GET requests to the first document and second recipient:
[12:00:00] POST /accounts/12345/envelopes
[12:01:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:02:00] GET /accounts/12345/envelopes/AAA/recipients/2
[12:03:00] POST /accounts/12345/envelopes
[12:04:00] GET /accounts/12345/envelopes/AAA/documents/1 *
[12:05:00] GET /accounts/12345/envelopes/AAA/recipients/2 *
However, the following set of requests comply with API rules and limits and would not be flagged by the platform:
[12:00:00] POST /accounts/12345/envelopes
[12:01:00] GET /accounts/12345/envelopes/AAA
[12:16:00] GET /accounts/12345/envelopes/AAA
[12:17:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:32:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:40:00] PUT /accounts/12345/envelopes/AAA/recipients/1
[12:41:00] PUT /accounts/12345/envelopes/AAA/recipients/1

LogicApps outlook.com connector GetEmails trigger - get oldest emails

I am trying to get oldest emails from outlook.com mailbox within LogicApp. I have done number of test and seems like both triggers available GetEmails and GetEmails(2) always start from the newest messages.
My use case:
Emails after processing are moved to Processed folder and shall be stored there for a month. So am looking for a way to get list of x number of oldest emails to check whether they are older than 30 days, and delete them if condition is met.
With the current functionality, I would have to get all the emails from the folder, what might be few thousands within 30 days time slot. This creates an unnecessary workload on the outlook.com but also within LogicApp. Additionally I am afraid I can reach thresholds for this connector.
Is there a way to get x number of emails starting from the oldest ones?
If you want to get top X oldest emails in a folder of outlook mailbox, you can use Microsoft Graph API by Http action in Logic App to get emails you want directly.
For instance , if I want to get top 5 oldest emails in Processed folder, use the API below :
GET https://graph.microsoft.com/v1.0/users/<username>/mailFolders('Processed')/messages?$orderby=receivedDateTime&$top=5
In logic App :
I have tested on my side and it works perfectly for me.
Details of Microsoft Graph outlook mail API see here .
And how to customize responses from API
And Auth for Microsoft Graph API.
If you have any further concerns, pls feel free to let me know.

Set API MaxTimeout in Loopback.io and detect slow apis

We are using loopback.io for writing and exposing our apis.
I need to do two things on my apis -
Need to set max timeout say 30 sec. max, for all apis. ( I tried some ways from Internet, none of them worked. )
If I am able to set the timeout for apis, I Need to get Slow apis list like alert, email or slack notification whatever possible.
All APIs which are not able to give response withing 29 seconds, I will send the api name as an slack notification that the API is taking time.
Any workaround on this?
Thanks,

Resources