Socialtables Layout Automation API returns error "Access Denied to this feature" - social-tables

I am trying to use the Layout Automation feature of the Social Tables API. When I submit my request, the following error response is returned:
{ "message": "Access Denied to this feature" }
This is the only API method that returns this message. I am able to perform other API actions successfully.
Here is the body for my request. Is something wrong with my request, or is there currently an issue with this API method?
{ "attendee_management": true,
"category": "Association",
"end_time": "2017-05-30T18:56:03.318Z",
"name": "Test Event",
"public": true,
"start_time": "2017-05-30T18:56:03.318Z",
"uses_metric": true,
"spaces": [
{
"name": "Test Space",
"venue_id": "131935",
"wizard": {
"attendees": 100,
"setup": "staggered",
"spacing": {
"x": 2,
"y": 2
}
}
}
],
"venue_mapper_version": 0 }

Your request structure is correct, but access to the Layout Automation API endpoints is currently a paid feature. A good next step might be to contact sales and explore the option of adding access to your account.
Cheers,
Robert

Related

Netcore server respond to slack interactive message

I am trying to build Slack application with asp net core server. Currently, I have added Slash command which makes a request to my local server through ngrok. Once my server receives that request, it makes a post request to configured slack webhook to display interactive message which looks like pic from attachment.
I want user to be able to select yes or no and receive the result in my controller, but I can't realize how to tell Slack where should it make a post request. I attach the code of this message which is posted through weebhook into Slack:
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "This is a section block with a button."
}
},
{
"type": "actions",
"block_id": "actionblock789",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Yes"
},
"style": "primary",
"value": "yes"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "No"
},
"value": "no"
}
]
}
]
}
What I have in netcore is TestController with route /api/test which I suppose should receive from Slack a payload where information about selected button is set, but I couldn't find a way where specify a url in this json code.
You can not configure a URL in the JSON code. That is not how it works with the Slack API.
Slack will send all responses to interactive message - like when someone clicks on a button - to the configured request URL of your Slack app. Check out this link how to find that parameter: documentation

Creating an event through the ST Developer Portal's API Console

I'm trying to create an event using the API console and keep getting errors. Any ideas why?
I've been using different versions of the example value:
{
"name": "string",
"description": "string",
"status": "string",
"event_id": "string",
"start_epoch": 0,
"end_epoch": 0,
"industry": "string",
"archived": true,
"deleted": true,
"legacy_id": 0,
"is_public": true
}
I get the following back. Any thoughts?
{
"code": "BadRequestError",
"message": "[\"Has time can't be blank\",\"true is not included in the list\"]"
}
You will need to fetch the user/team information first
Once you have your oauth token from above and set to the Authorization header, make a call to https://developer-portal.socialtables.com/api-console#!/Authentication/get_4_0_oauth_token
This will give you the user and team object back to make subsequent calls to make events
Once you have the team_id you can now make events
You can POST to /4.0/events
Swagger doc: https://developer-portal.socialtables.com/api-console#!/Events/post_4_0_events
Example POST payload:
{
"name": "NAME",
"description": "DESCRIPTION",
"status": "new",
"start_epoch": TIME_IN_MS,
"end_epoch": TIME_IN_MS,
"industry": "INDUSTRY_TYPE",
“has_time”: 1 // 0 = all day event, 1 = from/to a specific time in day
}
- This will return the event ID under data.event.id in the response from the above POST
- You can then link the user to:
https://home.socialtables.com/events/EVENT_ID

call shopify api Creating a checkout response variantid is invalid

i call api Creating a checkout
the variant_id is 38894644552 is correct ,but this api response
variantid is is invalid
get my shop variant id
get https://suisui.myshopify.com/admin/products/9981337608/variants.json
Response: { "variants": [ { "id": 38894644552, "product_id": 9981337608,...
Creating a checkout with variant id
POST /admin/checkouts.json HTTP/1.1
Host: suisui.myshopify.com
X-Shopify-Access-Token: xxx
Content-Type: application/json
{ "checkout": { "lineitems": [ { "variantid": 38894644552, "quantity": 3 }
Response:
{ "errors": { "lineitems": { "0": { "variantid": [ { "code": "invalid", "message": "is invalid", "options": {} }
what's wrong with variantid 38894644552 ?
Thank you~
Your app must be a sales channel for this api to work,
In Shopify Partners got to App Setup and it should look like this:
You will need to remove all existing installations to do this.
The variant has to be for a product published to the checkout
e.g. After you've installed your checkout API app
go to products and locate the Sales Channels box.
Click Manage
Click your checkout channel
Click Done
click Save

Events received by client websocket as a consequence of calling builder.Prompts.text() in a bot are missing the activity payload

botframework Node.js [DirectLine 3.0 API / React Native Client (Android)] Events received by client websocket as a consequence of calling builder.Prompts.text() in a bot are missing the ‘data’ property (i.e. the activity payload).
Version Information
React Native Client (Android)
Node.js v7.5.0
react-native v0.41.2
Bot
Node.js v6.3.1
botbuilder v3.7.0
DirectLine
API v3.0
Description of Issue
Events received by client websocket as a consequence of calling builder.Prompts.text() in a bot are missing the ‘data’ property (i.e. the activity payload).
Note: Subsequent events following this one will include the Symbol ‘original_event’ which includes the missing event details that would have been expected in the initial event.
Direct Line request from bot (i.e. captured from ChatConnector.authenticatedRequest()):
{
json: true,
method: “POST”,
url: “https://state.botframework.com/v3/botstate/directline/conversations/[MY CONVERSATION ID]”,
body: {
from: {
id: “MyBot#ZSXyfFggVqW”,
name: “MyBot”
},
recipient: {
id: “MyClientId”
},
text: “Hi Pete, please enter the code displayed in the browser page to complete the sign in process.”,
type: “message”
}
}
Event received by websocket:
{
… // Expecting a data property at this level. Don’t confuse this with the data property in the Symbol below, which is for the previous event.
Symbol(original_event): {
data: "{
"activities": [
{
"type": "typing",
"id": "[MY CONVERSATION ID]|5ChLjtMKBEz",
"timestamp": "2017-05-04T10:37:48.3923201Z",
"channelId": "directline",
"from": {
"id": "MyBot",
"name": "MyBot"
},
"conversation": {
"id": "[MY CONVERSATION ID]"
}
}
]}",
type: ”message”
},
timestamp: 1493894269211,
type: “message”
}
Event after the one above contains:
{
…
Symbol(original_event): {
data: "{
"activities": [
{
"type": "message",
"id": "[MY CONVERSATION ID]|0000030",
"timestamp": "2017-05-04T10:37:49.092354Z",
"channelId": "directline",
"from": {
"id": "MyBot",
"name": "MyBot"
},
"conversation": {
"id": "[MY CONVERSATION ID]"
},
"text": "Hi Pete, please enter the code displayed in the browser page to complete the sign in process.”
}
],
"watermark": "30"
}",
type: ”message”
},
timestamp: 1493894511787,
type: “message”
}
Notes:
• Notice that the event following the original has the data property we would have expected, contained in the Symbol “original_event”.
• If the same conversation thread is attempted for any other channel type, the message “Hi Pete, please enter the code displayed in the browser page to complete the sign in process” IS shown in the chat window (i.e. Skype, Slack, Web Chat etc). It is only direct line that appears to have the issue.
• The message in question is a proactive message triggered after a user has been authenticated and a redirect URL called. The message is required to prompt the user for a second form of authentication, in this particular case an access code.
• If all historic message activities are requested for the above conversation, the missing message is among said activities i.e.:
https://directline.botframework.com/v3/directline/conversations/[MY CONVERSATION ID]/activities?watermark=[INITIAL WATERMARK]
{
"activities": [
…
{
"type": "message",
"id": "[MY CONVERSATION ID]|0000009",
"timestamp": "2017-05-04T17:48:33.0747342Z",
"channelId": "directline",
"from": {
"id": "MyBot"
},
"conversation": {
"id": "[MY CONVERSATION ID]"
},
"text": "Hi Pete, please enter the code displayed in the browser page to complete the sign in process."
}
…
Any suggestions?
Update 05/05/2017
Currently pursing two avenues of thought, either there is an issue with the WebSocket library bundled with React Native, or we have a general Direct Line WebSocket issue (a colleague of mine will be retesting with a native IOS client this morning to confirm one way or another).
No longer an issue. Websocket events now appear to be coming through as expected.

How do I create an event using the SocialTables API?

I'm trying to use the /4.0/legacyvm3/teams/{team}/events endpoint to create an event. I'm running into some trouble with spaces.
I used the /4.0/legacyvm3/teams/{team}/venues endpoint to get a list of venues. I chose one to include in the spaces section and posted this:
{
"name": "Event via API Test 04",
"category": "athletic event",
"public": true,
"attendee_management": true,
"start_time": "2017-04-05T16:13:54.217Z",
"end_time": "2017-04-05T16:13:54.217Z",
"uses_metric": false,
"venue_mapper_version": 0,
"spaces": [
{
"venue_id": 128379,
"name": "Snurrrggggg"
}
]
}
The endpoint returns a 400 code and this error:
{
"code": 400,
"message": "Cannot read property 'toLowerCase' of undefined"
}
I tried including the wizard section, but each time it would return this error:
{
"message": "Access Denied to this feature"
}
After some experimentation, this body succeeded:
{
"name": "Event via API Test 03",
"category": "athletic event",
"public": true,
"attendee_management": true,
"start_time": "2017-04-05T16:13:54.217Z",
"end_time": "2017-04-05T16:13:54.217Z",
"uses_metric": false,
"venue_mapper_version": 0,
"spaces": [
{
"name": "Fake News Room"
}
]
}
But the application itself would not display the diagram, and the newly created room did not show up in my list of venues. Perhaps it did not assign permissions to it?
In any case, I don't actually want to create a new venue/space. I want to pass in an existing venue/space. How do I do that?
The short answer is to create a working diagram in 4.0 you will need to POST some data to the /4.0/diagrams endpoint.
The room you create doesn't map to the same concept as venues. When you create an event as you did, it creates a new space entity. The spaces endpoints can return information on those.