What does the 's' of Twilio API's sid stand for? - twilio-api

In Twilio's API docs, sid is frequently used, for example, workflowSid.
Does the sid means secure id or not?
I did some search with no obvious answer.
Could anyone please point out what does sid means?

Newer documentation says it stands for "String Identifier":
https://www.twilio.com/docs/glossary/what-is-a-sid
(This was bugging me too. It's not mnemonically helpful to see an acronym everywhere without a sensible meaning of what it is)
"String ID" will have to do!

After Searching their documents a while ago because I was Looking For the same thing, SID Stands for "Security IDentifier"
https://support.twilio.com/hc/en-us/articles/223134387-What-is-a-Message-SID-

In Twilio App, SID means an unique identifier given for an account along with token to verify account details when executing an API, 's' here can be taken as 'sender'. SID can be taken as sender id.
'S' here can be taken as 'sender' or 'secure' or 'specific' or 'service'.

Related

Apache Shiro Permissions: How to implement any of permission check

I have a list of the following permissions:
book:download:red,
book:download:blue,
book:download:green
Now, I want to check whether the subject has any of those permissions set. If at least one of them is present, - permit.
So, on my REST controller, I am slapping this annotation with value:
#RequiresPermissions(value = book:download:*)
It means in my case, the subject has at minimum one valid book it can download, - let him in!
But, to my surprise, I get 403 with:
Subject does not have permission [book:download:*]
I would expect Shiro to use this wildcard and compare it against submitted permission like a REGEX check. And a result would have been - access allowed.
Please correct me if my understanding is wrong. And is there is a way to achieve what I am asking here?
Think of the match the other way, your resource has a specific permission "book:download:red" and your user can download any book because they have a more general permission book:download or book:download:* (or the same specific red permission)
You can also configure the annotation to use a logical "OR", where you could use your list of red, blue, or green
https://shiro.apache.org/static/1.7.1/apidocs/org/apache/shiro/authz/annotation/RequiresPermissions.html
See more: https://shiro.apache.org/permissions.html
you can use something like following:
#RequiresPermissions(value=
{PermissionsConstants.BOOK_DOWNLOAD_RED,
PermissionsConstants.BOOK_DOWNLOAD_BLUE,
PermissionsConstants.BOOK_DOWNLOAD_GREEN}, logical = Logical.OR)

How to trigger multiple Intent in Webhook api.ai?

I am developing an api.ai bot that will search for the Vendor name in the database.
a ) if vendor exist -> provide username -> provide password
b) if vendor doesn't exist -> (add vendor -> yes ) or (add vendor -> No)
I have a webhook which is checking the vendor exist in database or not .
Bot Scenario: (Example )
Case1:
User: Do Alpha exist as a vendor?
Bot: yes, Alpha exist in Database. Please Provide User Name.
User: abc#gmail.com
Bot: Please Provide Password?
User: abcdef
Bot : Welcome
Case 2:
User: Do Beta exist as a vendor ?
Bot: No Beta is not a vendor. Do you want to Register?
Case 1:
User: Yes
Bot: Please fill this Form.
Case 2:
User: No
Bot: Is there any other way I can help
One thing I have figured out, I have to use output context to trigger the intent. But how can I do it in this complex case? and how can I call multiple to follow up intent using Output Context?
I might be using a bad approach, Is there any other way to solve this ?
I do have a follow-up question.
when we pass the fulfillment response back to dialogue flow. The response print on bot console will be the default text response, how can I get "fulfillmentText" to be the Response.
Thank you Guys. This is the followup Intent scenario.
This is not complex, you are doing it wrong by having two intents for collecting username/password.
Try the following way
When you detect that your vendor is present - set the context in webhook, as say, "vendor-present"
When the vendor is not present - set the context in webhook, as say, "vendor-new"
Use lifespan (the number at the left side of the context) to set the lifetime or validity of the context.
Create a separate intent for existing vendor - say "Vendor Data Collection" for collecting username and password. Set input context as "vendor-present" in the Dialogflow. Here you will collect these as parameters in the same intent (see image below). Mark these parameters as 'required' so that they must be collected by your bot. Use the Prompt section to put your response question for collecting information like "Please provide username".
If the vendor is not present, use existing intents and set input context as "vendor-new" in the Dialogflow.
Now, few things to note - the username parameter can be collected using the system entity #sys.given-name. But it is not very accurate with the Non-American/English names. I am not sure if this is improved or not. Secondly, there is no system entity to collect passwords, so you need to set the entity as #sys.any and in the webhook, you need to use regex to extract passwords on your own. BTW - you are not supposed to share passwords!
Hope this helped you!

Deezer Artists TOP songs method, same token, different answers

This call
http://api.deezer.com/2.0/artist/4762/top?output=xml&limit=30&access_token=...
executed via server gives me two different lists of songs if it is executed from a USA server OR from a Spanish server.
I have been told that, using a PREMIUM token, the API should answer according to the country of the user, but in this case it doesn't happen (the token belongs to the same premium user).
These are the songs (id) I get from US:
1016021
74440163
74254892
72545071
1016005
74254893
74254895
73945040
1016003
74254894
73945037
74254896
73945038
64820753
73945039
73945045
64820745
16880921
73945041
64820747
73945042
64820750
1016023
73945043
73945046
73945044
64820746
7511353
73945047
64820755
these are the ones I get from spain
74440163
74254892
73945036
74254893
73945040
74254895
74254894
73945037
73945038
74254896
73945039
64820753
73945045
64820745
64820756
73945041
16880921
64820747
73945042
64820750
73945043
73945044
73945046
64820746
7511353
73945047
64820755
64820748
64820757
16881228
Also strange is that if, from the US server, I try to get info about the first song retrieved
http://api.deezer.com/2.0/track/1016021/?access_token=...
The API says that the song is not readable; can a "not-readable" song be in the top 30?
As far as I know your account should be Premium+ to get still the same content regardless of your location.

Get message id (not universal id) from Notes document

I want to fetch message id of the document. I tried
document.getItemValueString("$MessageID");
but it's giving null.
Check out this thread from the Notes forum. You may need to follow the advice there, which is to set the saveMessageOnSend property to true before sending and then obtain the $MessageID from the copy of the document that is saved back to the mail database.
http://www-10.lotus.com/ldd/nd6forum.nsf/78d8a01e181f9b73852569fa0078668a/f08a0ebfc65537b185257b4300097939?OpenDocument
Otherwise, you may need to add a tilde before the dollar sign:
document.getItemValueString("~$MessageID");

How to identify account type

I get list of accounts by using getAccount() and discoverAndAddAccounts(). For each account type (CREDIT, LOAN, etc...), there are specific set of fields that I need to access. For example, I want to access creditMaxAmount field of CreditAccount. However, i dont seem to find a way to identify "type" of a given account object.
In summary, given output of above mentioned functions, how do I identify account type in order to access fields specific to that account type.
The type of account is identified by the Account header.
See https://ipp.developer.intuit.com/index.php?title=0010_Intuit_Partner_Platform/0020_Aggregation_%26_Categorization_Apps/AggCat_API/0020_API_Documentation/0050getLoginAccounts for the response XML.
As you can see there is InvestmentAccount, CreditAccount, BankingAccount, LoanAccount, ..., and OtherAccount.
If an account shows up as OtherAccount, that means that it has not been set to a specific account. You can use updateAccountType to set the type of account it should be.
<ns8:AccountList xmlns="http://schema.intuit.com/platform/fdatafeed/account/v1"
xmlns:ns2="http://schema.intuit.com/platform/fdatafeed/creditaccount/v1"
xmlns:ns3="http://schema.intuit.com/platform/fdatafeed/rewardsaccount/v1"
xmlns:ns4="http://schema.intuit.com/platform/fdatafeed/bankingaccount/v1"
xmlns:ns5="http://schema.intuit.com/platform/fdatafeed/investmentaccount/v1"
xmlns:ns6="http://schema.intuit.com/platform/fdatafeed/otheraccount/v1"
xmlns:ns7="http://schema.intuit.com/aggregation/loanaccount/v1"
xmlns:ns8="http://schema.intuit.com/platform/fdatafeed/accountlist/v1">
<ns7:**LoanAccount**>
<accountId>75000033014</accountId>
<accountNumber>9900009994</accountNumber>
<accountNickname>My Military Loan</accountNickname>
<displayPosition>5</displayPosition>
<institutionId>0</institutionId>
<description>Description</description>
<balanceAmount>90227.2</balanceAmount>
<aggrSuccessDate>2012-02-27T23:20:13.651-08:00</aggrSuccessDate>
<aggrAttemptDate>2012-02-27T23:20:13.651-08:00</aggrAttemptDate>
<aggrStatusCode>0</aggrStatusCode>
<currencyCode>USD</currencyCode>
<ns7:loanType>**MILITARY**</ns7:loanType>
There is no direct way to identify the Account type, the getBankingAccountsAndCreditAccountsAndLoanAccounts() method will return the Accounts, and you would need to check the Object type in order to determine the Account type.