IBM Social Business Toolkit getContacts API Fails With 403 Forbidden - ibm-sbt

I used to be able to use the IBM SBT getContacts API from either a perl script (with authentication provided in the request) or an internet browser (authentication popup would appear) and it would return the data in JSON format as documented on the IBM Connections Developers API reference page:
http://www-10.lotus.com/ldd/appdevwiki.nsf/xpAPIViewer.xsp?lookupName=API+Reference#action=openDocument&res_title=Contacts_getContacts_API&content=apicontent&sa=true
Recently, however, the API call has been returning a 403 forbidden status. If I sign in to the IBM Connections Cloud before trying to use the API via a browser, it is converted to:
https://apps.na.collabserv.com/mycontacts/home.html
Does anyone know what I need to do to get the API to work again?
Thanks.

The best API to use are
https://apps.na.collabserv.com/lotuslive-shindig-server/social/rest/people/#me/#all?filterBy=type&filterOp=equals&filterValue=contacts&format=json
You'll get a list of the following entries back...
{
"photos":
[
],
"telephone": "",
"profileUrl": "",
"mobilephone": "",
"orgs":
[
{
"value": "CONTACTS",
"type": "Source"
},
{
"value": "Mentorship Expressway",
"type": "Org"
}
],
"website": "",
"id": "na.collabserv.com:contact:160000909070",
"fax": "",
"connectedToId": 201238541234,
"addresses":
[
],
"emailAddress": "asdfasdf#us.ibm.com",
"websites":
[
],
"objectId": 160000909070,
"type": "FRIEND",
"jobtitle": "",
"updated": "2014-07-01T16:44:21.000Z",
"ims":
[
],
"emails":
[
{
"value": "CONTACTS",
"type": "Source"
},
{
"title": "Primary Email",
"email": "asdfasdf#us.ibm.com"
}
],
"org":
{
"name": "Mentorship Expressway"
},
"displayName": "asdfasdf",
"address": "",
"companyId": 22285,
"phoneNumbers":
[
{
"value": "CONTACTS",
"type": "Source"
},
{
"title": "MOBILE",
"phone": "+ asdfasdf"
}
]
}

Related

Cannot retreive virtual card number in test mode via stripe API using Go examples

Trying to follow the example here: https://stripe.com/docs/issuing/cards/virtual
When I add params.AddExpand("number"), no number is returned, yet via the dashboard I was able to see the card numbers. Here's sample code and redacted info for the Req and Resp.
func (ac *appContext) CardRetrieve(id string) *stripe.IssuingCard {
stripe.Key = ac.Config.Stripe.SecretKey
params := stripe.IssuingCardParams{}
params.AddExpand("number")
params.AddExpand("cvc")
ic_num, _ := card.Get(id, &params)
return ic_num
}
Returns:
{
"id": "ic_redacted",
"object": "issuing.card",
"brand": "Visa",
"cancellation_reason": null,
"cardholder": {
"id": "ich_redacted",
"object": "issuing.cardholder",
"billing": {
"address": {
"city": "A Beach",
"country": "US",
"line1": "404 Main St.",
"line2": "Suite #302",
"postal_code": "19001",
"state": "DE"
}
},
"company": null,
"created": 1613338532,
"email": "redacted#notreal.com",
"individual": {
"dob": {
"day": 20,
"month": 10,
"year": 1990
},
"first_name": "User",
"last_name": "Testing",
"verification": {
"document": {
"back": null,
"front": null
}
}
},
"livemode": false,
"metadata": {
},
"name": "User Testing",
"phone_number": "+15165551212",
"requirements": {
"disabled_reason": "under_review",
"past_due": [
]
},
"spending_controls": {
"allowed_categories": [
],
"blocked_categories": [
],
"spending_limits": [
{
"amount": 1,
"categories": [
],
"interval": "daily"
}
],
"spending_limits_currency": "usd"
},
"status": "active",
"type": "individual"
},
"created": 1613338532,
"currency": "usd",
"exp_month": 1,
"exp_year": 2024,
"last4": "0088",
"livemode": false,
"metadata": {
},
"replaced_by": null,
"replacement_for": null,
"replacement_reason": null,
"shipping": null,
"spending_controls": {
"allowed_categories": null,
"blocked_categories": null,
"spending_limits": [
{
"amount": 1,
"categories": [
],
"interval": "daily"
}
],
"spending_limits_currency": "usd"
},
"status": "inactive",
"type": "virtual"
}
What confuses me is the documentation found here:
https://stripe.com/docs/issuing/cards/virtual
It says: You can retrieve both the full unredacted card number and CVC from the API. For security reasons, these fields are only available for virtual cards and will be omitted unless you explicitly request them with the expand property. Additionally, they are only available through the Retrieve a card endpoint. That links to the issue card retrieval end point, but the params defined in the virtual cards example references the CardParams{} struct.
No of the examples show what imported module their aliasing for card to exec card.Get, but it stands to reason given the flow of the documentation that this should be IssuingCardParams{} and that the card alias is referencing: "github.com/stripe/stripe-go/issuing/card"
I also find it strange that we're defining params in the example but not passing it into the card.Get()
Edit:
I went digging through the module and it seems like to get the card details you have to call: details, _ := card.Details(id, params) but I get a 404 when trying to call that. The object returned is actually the right object and I see number and cvc, albeit nil.
I get the following error:
2021/02/15 00:33:06 Request error from Stripe (status 404): {"status":404,"message":"Unrecognized request URL (GET: /v1/issuing/cards/ic_redacted/details). Please see https://stripe.com/docs
So it seems you need to include a /v72 in the import:
"github.com/stripe/stripe-go/v72"
The documentation should be updated to show this and the virtual card example for go should also be updated.

Alexa.Discovery response: no device detected by Alexa

I am implementing my Alexa Home Skill using AWS Lambda.
Given the following request I receive when I try to detect new devices on Alexa Skil test page:
{directive={header={namespace=Alexa.Discovery, name=Discover, payloadVersion=3, messageId=0160c7e7-031f-47ee-a1d9-a23f38f87a9e}, payload={scope={type=BearerToken, token=...}}}}
I respond with the following:
{
"event": {
"payload": {
"endpoints": [
{
"displayCategories": [
"SMARTPLUG"
],
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
},
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"retrievable": true,
"supported": [
{
"name": "powerState"
}
],
"proactivelyReported": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"retrievable": true,
"supported": [
{
"name": "connectivity"
}
],
"proactivelyReported": true
}
}
],
"manufacturerName": "mirko.io",
"endpointId": "ca84ef6d-53b1-430a-8a5e-a62f174eac5e",
"description": "mirko.io forno (id: ca84ef6d-53b1-430a-8a5e-a62f174eac5e)",
"friendlyName": "forno"
}
]
},
"header": {
"payloadVersion": "3",
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"messageId": "c0555cc8-ad7a-4377-b310-9de9b9ab6282"
}
}
}
Despite that, for some reasons Alexa answers that it did not find any new device.
I may be mistaken but I am pretty sure it used to work before I decided to add the Alexa.EndpointHealth interface.
Your response object looks right to me, except the extra "endpoint" field.
"endpoint": {
"endpointId": "INVALID",
"scope": {
"type": "BearerToken",
"token": "INVALID"
}
}
There's no such field in the Alexa.Discovery documentation. Try removing it and see if it resolves the issue.

Azure Data Factory how to deploy Alerts & Metrics to other environments with DevOps

We have a Azure datafactory fully integrated with DevOps. Every change I make to the datafactory is deployed to all environments (OTAP), except alerts & metrics. I cannot find anything on how to deploy these to the other environments. Is this possible at all?
Is this possible at all?'
Quick answer is NO so far. I contacted Microsoft ADF team and got below response:
Azure Data Factory utilizes Azure Resource Manager templates to store
the configuration of your various ADF entities. Entities on Alerts &
Metrics does not get exported in the ARM template, so Alerts & Metrics
won’t be integrated using DevOps.
I did 2 verifications:
1.Check ARM template supported entities in ADF, Alerts & Metrics doesn't exist.
2.Try to export ARM template in the ADF UI but still no Alerts & Metrics
Really understand you would like to integrate all elements in Data Factory including Alerts & Metrics with DevOps. I suggest you submitting feedback here to push improvements of ADF, any voice is welcome.
There is a way to work around this one.
ADF alert is a "Microsoft.Insights/metricalerts" resource that you can deploy using ARM deployment operation from Azure Devops.
You can try to create an alert in ADF and then go to Portal, search for: Monitor > Alert > Alert Rule, and find the Alert you created in ADF. In my case there is an Alert called Test
Here is the ARM template exported from the alert
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"metricalerts_Alert_name": {
"defaultValue": "Alert",
"type": "String"
},
"factories_test_externalid": {
"defaultValue": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/yyyyy/providers/Microsoft.DataFactory/factories/test",
"type": "String"
},
"actionGroups_actiongroup1_externalid": {
"defaultValue": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/yyyyy/providers/microsoft.insights/actionGroups/actiongroup1",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Insights/metricalerts",
"apiVersion": "2018-03-01",
"name": "[parameters('metricalerts_Alert_name')]",
"location": "global",
"tags": {
"CreatedTimeUtc": "2022-09-13T05:28:46.0663823Z"
},
"properties": {
"severity": 0,
"enabled": true,
"scopes": [
"[parameters('factories_test_externalid')]"
],
"evaluationFrequency": "PT1M",
"windowSize": "PT15M",
"criteria": {
"allOf": [
{
"threshold": 1,
"name": "PipelineFailedRuns",
"metricNamespace": "Microsoft.DataFactory/factories",
"metricName": "PipelineFailedRuns",
"dimensions": [
{
"name": "Name",
"operator": "Include",
"values": [
"pipeline2"
]
},
{
"name": "FailureType",
"operator": "Include",
"values": [
"UserError",
"SystemError",
"BadGateway"
]
}
],
"operator": "GreaterThanOrEqual",
"timeAggregation": "Total",
"criterionType": "StaticThresholdCriterion"
}
],
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
},
"actions": [
{
"actionGroupId": "[parameters('actionGroups_actiongroup1_externalid')]",
"webHookProperties": {}
}
]
}
}
]
}
For the actionGroups you can refer to
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"groupName": {
"defaultValue": "actiongroup1",
"type": "string"
},
"email_receiver_address": {
"defaultValue": "someEmail#gmail.com",
"type": "string"
}
},
"variables": {},
"resources": [
{
"type": "microsoft.insights/actionGroups",
"apiVersion": "2019-03-01",
"name": "[parameters('groupName')]",
"location": "global",
"tags": {
"CreatedTimeUtc": "2020-10-21T07:24:08.2808723Z",
},
"properties": {
"groupShortName": "test",
"enabled": true,
"emailReceivers": [
{
"name": "test email received",
"emailAddress": "[parameters('email_receiver_address')]",
"useCommonAlertSchema": false
}
],
"smsReceivers": [],
"webhookReceivers": [],
"itsmReceivers": [],
"azureAppPushReceivers": [],
"automationRunbookReceivers": [],
"voiceReceivers": [],
"logicAppReceivers": [],
"azureFunctionReceivers": []
}
}
]
}

Asymmetrik FHIR Server Core support FHIRCast?

I have established a "subscription" to updates on a specific "Bundle". For some reason, the web hook is not firing. Is FHIRCast supported on Asymmetrik's FHIR Server? Here is my "subscription" json payload:
{
"resourceType" : "Subscription",
"status" : "active",
"contact": [
{
"relationship": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
"code": "N"
}
]
}
],
"name": {
"family": "du Marché",
"_family": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
"valueString": "VV"
}
]
},
"given": [
"Bénédicte"
]
},
"telecom": [
{
"system": "phone",
"value": "+33 (237) 998327"
}
],
"address": {
"use": "home",
"type": "both",
"line": [
"534 Erewhon St"
],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
"postalCode": "3999",
"period": {
"start": "1974-12-25"
}
},
"gender": "female",
"period": {
"start": "2012"
}
}
],
"end" : "2021-02-07T13:28:17.239+02:00",
"reason" : "FHIR web hook",
"criteria" : "Bundle/af03af555d9eb78229619cfeac8767409fd22f72",
"error" : "error note",
"channel" : {
"type" : "rest-hook",
"endpoint" : "https://localhost:5001/api/FHIRNotification",
"payload" : "application/fhir+json",
"header" : [""]
}
}
Perhaps I am missing an implementation step to add the subscription web hook functionality?
Thanks for the help!
Todd
Currently we do not support FHIRCast out of the box since this is a facade server. To get FHIRCast working properly you would also probably need triggers or something else setup on the database.
Im not super familiar with FHIRCast personally but it does seem like there is some connection to a hub separate of the FHIR server as well.

MobileFirst create wrong SMS request

IBM MobileFirst Platform Foundation 8.0.0.
After configuring SMS settings I am trying to send a message but the request is created in the wrong way. See the result below.
//REST API : send notification request
{
"message": {
"alert": "Hello World from an SMS message"
},
"notificationType":3,
"target" : {
"deviceIds" : ["9a149c24-8859-3383-6067-d161e46d2554"]
}
}
The created request:
473607:[2017-01-02 16:44:02.494] - [440093822] Request received: HTTP GET /send.aspx?
encode=false&name=toParamName&value=Recipients&encode=false&name=textParamName&value=MessageText&encode=false&name=MessageType&value=text&encode=false&name=SenderName&value=PLIX&encode=false&name=UserName&value=MahmoudSamy&encode=true&name=Password&value=xyz&to=20100051111&text=Hello+World+from+an+SMS+message+2
//SMS settings
{
"port": "80",
"programName": "/sendsms",
"host": "xyz.com",
"name": "SMSGateway",
"parameters": [
{
"encode": "false",
"name": "toParamName",
"value": "to"
},
{
"encode": "false",
"name": "textParamName",
"value": "text"
},
{
"encode": "false",
"name": "SenderName",
"value": "Support"
},
{
"encode": "false",
"name": "UserName",
"value": "xyz"
},
{
"encode": "false",
"name": "Password",
"value": "xyz"
}
]
}
We tried to send SMS with SMS settings shared by you.
We are able to get correct value pair in the created request.
Below is the created request
GET /gateway/add.php?encode=false&name=toParamName&value=to&encode=false&name=textParamName&value=text&encode=false&name=SenderName&value=Support&encode=false&name=UserName&value=xyz&encode=false&name=Password&value=xyz&to=99&text=Hello+World+from+an+SMS+message HTTP/1.1
Also in created request shared by you, I am noticing different username value than given in sms settings.
Could you please tell us how you are checking the request. We are using wireshark to capture.
the below configuration works with me but it force me to accept to and text parameters.
{
"port": "80",
"programName": "/sendsms",
"host": "xyz.com",
"name": "SMSGateway",
"parameters": [{
"SenderName": "Support",
"MessageType": "text",
"UserName": "xyz",
"Password": "xyz"
}]
}
HTTP GET /send.aspx?SenderName=Support&MessageType=text&UserName=xyz&Password=xyz&to=083127312763&to=hello+world

Resources