I have sideloaded a teams app with an activity type, so that I could I could use the activity feed graph api. However, when I send a teams/<teamId>/sendActivityNotification request, I get 501 "Not Implemented". There are no specifics in the response.
{ "error": { "code": "NotImplemented", "message": "Failed to process request.", "innerError": { "date": "2021-04-16T07:48:31", "request-id": "bd92c3a5-9ec5-49a1-a2d5-057f7dd3c182", "client-request-id": "bd92c3a5-9ec5-49a1-a2d5-057f7dd3c182" } }}
I think I may be missing something about how graph API integrates with teams apps.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
"manifestVersion": "1.8",
"id": "<APP_ID>",
"version": "1.0",
"packageName": "com.nikita",
"developer": {
"name": "Nikita Cool Dude",
"websiteUrl": "https://www.microsoft.com",
"privacyUrl": "https://www.microsoft.com",
"termsOfUseUrl": "https://www.microsoft.com"
},
"name": {
"full": "MMM service test",
"short": "MMM service test"
},
"accentColor": "#FFFFFF",
"description": {
"full": "Packages mmm activity types.",
"short": "Packages mmm activity types."
},
"icons": {
"outline": "mmm-small.png",
"color": "mmm-small.png"
},
"activities": {
"activityTypes": [
{
"type": "mmmChannelCreated",
"description": "New channel is created for an mmm event",
"templateText": "New <priority> <cfs> event"
}
]
},
"connectors": [
{
"connectorId": "<APP_ID>",
"scopes": ["team"]
}
]
}
Note that I am adding a connector I'm not using. Otherwise I get Error while reading manifest.json: "configurableTabs, staticTabs, bots, connectors, or composeExtensions" is required error when sideloading the app. The app id is created through portal.azure.com.
Below is the request payload, in case that is relevant. I based it very closely on examples in the graph API documentation.
{
"topic": {
"source": "entityUrl",
"value": "https://graph.microsoft.com/v1.0/teams/<teamId>/channels/<channelId>",
},
"activityType": "mmmChannelCreated",
"previewText": {
"content": "New important event!"
},
"templateParameters": [
{
"name": "priority",
"value": "P1"
},
{
"name": "cfs",
"value": "Armed Robbery"
}
]
}
Any ideas are appreciated!
In your manifest webApplicationInfo section is missing. The Teams app manifest must have the Azure AD app ID added to the webApplicationInfo section. Follow the requirements provided in documetation to use sendActivityNotification.
In my asp.net core 3 electron.net app, when I leave the default electron.manifest.json, it builds and runs well but fails to use icons.
Icons are set as content with copy always attribute.
However when I try to change the product Id and related information, it crashes.
{
"executable": "Text Converter",
"splashscreen": {
"imageFile": "/wwwroot/assets/USFMConverter.png"
},
"singleInstance": false,
"build": {
"appId": "com.CrossPlatformTextWebApplication.app",
"productName": "Text Converter",
"copyright": "Copyright © 2020",
"buildVersion": "1.0.1",
"win": {
"icon": "/wwwroot/assets/icons/icon.ico"
},
"mac": {
"icon": "/wwwroot/assets/icons/icon.icns"
},
"linux": {
"icon": "/wwwroot/assets/icons"
},
...
I think it's the name of executable.. does your project name have a space? Change it to a hyphen again... and then also in the electron.manifest.json file...
I want to create a graph using neo4j which gives me a graph of the terms in the "JavaScript" array of the following JSON data, along with relationships pointing to unique "relatedTerms" nodes.
Here is my JSON data:
{
"JavaScript": [
{
"termName": "asm.js",
"link": "/terms/javascript/asmjs",
"info": "A subset of JavaScript. Effectively describes a safe virtual machine for memory-unsafe languages like C or C++. It can be used as a low-level, efficient target language for compilers.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
},
{
"name": "C",
"link": "/terms/go_to_term/470"
},
{
"name": "C++",
"link": "/terms/go_to_term/860"
},
{
"name": "compilers",
"link": "/terms/go_to_term/390"
}
],
"category": "JavaScript"
},
{
"termName": "Cycle.js",
"link": "/terms/javascript/cyclejs",
"info": "JavaScript framework for a predictable code. Builds on functional and reactive streams. Describes an app as a simple function taking an event stream as input and outputting an event stream.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
}
],
"category": "JavaScript"
},
{
"termName": "Derby",
"link": "/terms/javascript/derby",
"info": "Server component which is written on top of Node.js. It's is a server-side application with rich real-time data synchronization technology such used in google docs.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
},
{
"termName": "Express.js",
"link": "/terms/javascript/expressjs",
"info": "Lightweight, efficient middleware and routing framework. Express.js is best known as another quarter of the MEAN (MongoDB, Express, AngularJS and Node) software stack, and is the most popular Node.js framework.",
"relatedTerms": [
{
"name": "MEAN",
"link": "/terms/go_to_term/361"
},
{
"name": "MongoDB",
"link": "/terms/go_to_term/868"
},
{
"name": "AngularJS",
"link": "/terms/go_to_term/47"
},
{
"name": "Node",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
},
{
"termName": "Flow",
"link": "/terms/javascript/flow",
"info": "A static type checker for JavaScript. Integrates with the code editor by checking changes and analyzing correctness of the code. Provides context as to what is wrong with the code.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
}
],
"category": "JavaScript"
},
{
"termName": "Hapi",
"link": "/terms/javascript/hapi",
"info": "Web framework for building web applications, APIs and services. Hapi was created around the idea that configuration is better than code, that business logic must be isolated from the transport layer.",
"relatedTerms": [
{
"name": "APIs",
"link": "/terms/go_to_term/206"
}
],
"category": "JavaScript"
},
{
"termName": "Koa",
"link": "/terms/javascript/koa",
"info": "Callback-less, lightweight middleware framework for Node.js to build efficient web applications and APIs. Koa.js efficiently uses generators to deal with callbacks and increase error-handling capabilities.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
},
{
"name": "API",
"link": "/terms/go_to_term/206"
}
],
"category": "JavaScript"
},
{
"termName": "MEAN",
"link": "/terms/javascript/mean",
"info": "A full stack JavaScript solution that refers to the first letters of the four components of a solution for building dynamic websites: MongoDB, a NoSQL database; Express.js, a web applications framework; Angular.js, a JavaScript MVC framework for web apps; Node.js, a software platform for scalable server-side and networking applications.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
},
{
"name": "MongoDB",
"link": "/terms/go_to_term/868"
},
{
"name": "NoSQL",
"link": "/terms/go_to_term/951"
},
{
"name": "Express.js",
"link": "/terms/go_to_term/392"
},
{
"name": "Angular.js",
"link": "/terms/go_to_term/47"
},
{
"name": "MVC",
"link": "/terms/go_to_term/201"
},
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
},
{
"termName": "Meteor",
"link": "/terms/javascript/meteor",
"info": "JavaScript framework built on top of Node.js with MongoDB as its database driver. With Node.js and Meteor, you’re using JavaScript everywhere, and data is synced through the use of WebSockets, a protocol that allows an interactive communication between server and browser.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
},
{
"name": "MongoDB",
"link": "/terms/go_to_term/868"
},
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
},
{
"name": "WebSockets",
"link": "/terms/go_to_term/1046"
}
],
"category": "JavaScript"
},
{
"termName": "Node.js",
"link": "/terms/javascript/nodejs",
"info": "One of the most popular JavaScript frameworks which eases the work of building web applications. By far the fastest growing language in use. Runs on Windows, Linux, and Mac OS. The use of Node.js is mainly for full stack, front-end and back-end.",
"relatedTerms": [
{
"name": "JavaScript",
"link": "/terms/go_to_term/549"
},
{
"name": "Windows",
"link": "/terms/go_to_term/1373"
},
{
"name": "Linux",
"link": "/terms/go_to_term/558"
},
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
},
{
"termName": "Oracle JET",
"link": "/terms/javascript/oracle_jet",
"info": "Oracle JavaScript Extension Toolkit. A modular toolkit based on modern JavaScript, CSS3 and HTML5 design and development principles. Created for developers who work on applications that consume and interact with Oracle products and services.",
"relatedTerms": [
],
"category": "JavaScript"
},
{
"termName": "Restify",
"link": "/terms/javascript/restify",
"info": "A Node.js module built specifically to enable to build correct REST web services. It borrows heavily from express as that is more or less the de facto API for writing web applications on top of Node.js.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
},
{
"name": "REST",
"link": "/terms/go_to_term/524"
},
{
"name": "API",
"link": "/terms/go_to_term/206"
}
],
"category": "JavaScript"
},
{
"termName": "Sails",
"link": "/terms/javascript/sails",
"info": "Sails.js wraps express and provides another higher level for doing things like connecting to the DB, auto-generating input pages, etc. Especially suitable for creating chat apps or multiplayer games.",
"relatedTerms": [
{
"name": "DB",
"link": "/terms/go_to_term/415"
}
],
"category": "JavaScript"
},
{
"termName": "Seneca",
"link": "/terms/javascript/seneca",
"info": "Microservices toolkit for Node.js. Helps to write an organized code that can be scaled and deployed at any time. Organizes the business logic of an app.",
"relatedTerms": [
{
"name": "Node.js",
"link": "/terms/go_to_term/595"
}
],
"category": "JavaScript"
}
]
}
My Expected Result looks like:
The following is my Query:
CALL apoc.load.json("file:///js.json") YIELD value
UNWIND value.JavaScript AS item
FOREACH(js IN item |
CREATE(cat:Category{name:js.termName})
FOREACH(rt in item.relatedTerms|
CREATE(rtt:RelatedTerms{name:rt.name})
MERGE (cat)-[r:RELATESTO]->(rtt)))
And here is my Actual Result:
Try switching the CREATE statements for MERGE statements. In Cypher, MERGE will check to see if a pattern exists and create it if it does not. CREATE will create a new pattern every time, even if a pattern like it already exists in the graph.
CALL apoc.load.json("file:///js.json") YIELD value
UNWIND value.JavaScript AS item
MERGE (cat:Category {name:item.termName})
WITH cat, item
UNWIND item.relatedTerms AS subitem
MERGE (rt:RelatedTerm {name:subitem.name})
MERGE (cat)-[:RELATES_TO]->(rt)
RETURN *
I am developing a solution for a product and trying to implement C2C connection. I am in stuck with linking SmartThings with my backend via OAuth.
I get request
{
"lifecycle": "CONFIGURATION",
"executionId": "41d224ba-7de3-77ac-fe87-a56fa6f325c3",
"locale": "en",
"version": "0.1.0",
"client": {
"os": "ios",
"version": "1.6.17",
"language": "uk"
},
"configurationData": {
"installedAppId": "7393625f-64d5-42cb-a52f-7935a677c4bb",
"phase": "PAGE",
"pageId": "linkPage",
"previousPageId": "",
"config": {}
},
"settings": {}
}
And return response, that is rendered in SmartThings App:
{
"configurationData": {
"page": {
"pageId": "linkPage",
"nextPageId": "",
"previousPageId": "",
"complete": true,
"name": "Account Linking",
"sections": [ {
"name": "Please, link SmartThings to your XXXXXX account",
"settings": [ {
"id": "linkAccount",
"name": "Link Account",
"type": "OAUTH",
"required": true,
"urlTemplate": "https://xxxxxx.auth.us-east-2.amazoncognito.com/login?response_type=code&client_id=20kucf9dcg5ju9deqeppugqft1&state=7393625f-64d5-42cb-a52f-7935a677c4bb&redirect_uri=https%3A%2F%2Fapi.smartthings.com%2Foauth%2Fcallback"
} ]
} ]
}
}
}
Authentication passes successfully and returns code to callback like that:
https://api.smartthings.com/oauth/callback?code=9dfea1ca-54e8-47e8-ba90-24f20068ad2b&state=7393625f-64d5-42cb-a52f-7935a677c4bb
But the callback returns HTTP 401.
I've read this topic https://community.smartthings.com/t/cloud-to-cloud-oauth-rest-api/118902 and did not find a solution. No more helpful info I could found on the Web.
Has anybody implemented this with success?
The Support is awful - no response for several days.. From my previous Support contacting experience - they can respond after several weeks...
Thank you!
This is a bug of iOS SmartThings application, Android works fine.
https://community.smartthings.com/t/cant-implement-oauth-for-cloud-to-cloud/143258/7
I'm evaluating atlassian-connect-express and just created an app
boilerplate with "atlassian-connect new", and then deployed it via ngrok
to my Jira dev account.
That works fine, but when I try to use the file "credentials.json" with
my account data, the plug starts with the error message:
Failed to register with host https://michael%40...:[My
password]#connect-ace.atlassian.net (401)
Add-on not registered; no compatible hosts detected
I get a similar message when I go to the url connect-ace.atlassian.net
Here my atlassian-connect.json
{
"key": "my-add-on",
"name": "Ping Pong",
"description": "My very first add-on",
"vendor": {
"name": "Angry Nerds",
"url": "https://www.atlassian.com/angrynerds"
},
"baseUrl": "https://xxxxxxx.ngrok.io",
"links": {
"self": "https://xxxxxxxx.ngrok.io/atlassian-connect.json",
"homepage": "https://xxxxxxx.ngrok.io/atlassian-connect.json"
},
"authentication": {
"type": "jwt"
},
"lifecycle": {
"installed": "/installed"
},
"scopes": [
"READ"
],
"modules": {
"generalPages": [
{
"key": "hello-world-page-jira",
"location": "system.top.navigation.bar",
"name": {
"value": "Hello World"
},
"url": "/hello-world",
"conditions": [{
"condition": "user_is_logged_in"
}]
},
{
"key": "hello-world-page-confluence",
"location": "system.header/left",
"name": {
"value": "Hello World"
},
"url": "/hello-world",
"conditions": [{
"condition": "user_is_logged_in"
}]
}
]
}
}
and my credatials.json
{
"hosts": {
"connect-ace.atlassian.net": {
"product": "jira",
"username": "michael#---",
"password": "---password---"
}
}
}
How can I get my dev account working with connect-ace?
Two things to check:
1 - Check the if the credentials.json has correct values. host url should start with https://. Password is the api token generated from here.
{
"hosts": {
"https://<your atlassian site name>.atlassian.net": {
"product": "jira",
"username": "<jira user name>",
"password": "<Token created from https://id.atlassian.com/manage/api-tokens>"
}
}
}
2- Enable development mode at Settings -> Apps -> Manage Apps -> Settings. (This is required if the app is not published in marketplace)
This error is a default from atlas-connect
Print error image
In atlasssian-connect.json
replace this :
"lifecycle": {
"installed": "/installed"
},
for this:
"lifecycle": {
"installed": "installed"
},
Have you tried spawning your own cloud instance and testing it there? If not yet, try creating one here. Once successfully registered, in your credentials.json, change "connect-ace" with your baseUrl/sitename and with the right credentials, it should automatically install it for you.