---
# System prepended metadata

title: Untitled

---

- [x] check installation works for sid
- [x] Handle delete from db
- [x] Add state verification back in
- [x] Try installation on Heka and check installation data
- [x] Decide on strucutre of dynamodb
    - [x] Get all installations and send messages
    - [x] Get specific company installation
    - [x] Get specific companys installations
    - [x] Get specific user within company (ideally without knowing the company they are in)
    - [x] Get specific users within company (ideally without knowing the companys they are in)
- [ ] Check it all works on live AWS Lambda
- [x] Make ticket to write readme

signingSecret=04dad07015014ea726d5c5a5128b897e
botToken=xoxb-171235635522-2534834928102-0rzl07AoS43zKNSb2CDI8C4v
clientId=171235635522.2565196105360
clientSecret=5ea48ea957f0738a6178958bec2a73be


No org, no enterprice install data (hekaapptestorg)
```
{
  installation: {
    team: { id: 'T02GY35KFLP', name: 'hekaapptestorg' },
    enterprise: undefined,
    user: {
      token: 'xoxp-2576107661703-2590808349906-2622659808272-8dc339e0b0687c429bc0858d7744a076',
      scopes: [Array],
      id: 'U02HCPSA9SN'
    },
    tokenType: 'bot',
    isEnterpriseInstall: false,
    appId: 'A02GM5S33AL',
    authVersion: 'v2',
    bot: {
      scopes: [Array],
      token: 'xoxb-2576107661703-2591732296710-FTeOKOa2SgStWXtVkmYDjkCW',
      userId: 'U02HDMJ8QLW',
      id: 'B02HZ25EAJD'
    },
    incomingWebhook: {
      url: 'https://hooks.slack.com/services/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',
      channel: '#saving-the-world',
      channelId: 'C02HCPRPK7U',
      configurationUrl: 'https://hekaapptestorg.slack.com/services/B02HE7SM1HC'
    }
  }
}
```

Org?, Enterprise? Install data (Heka)

```

```


install query
```
installQuery: {
    userId: 'U02HCPSA9SN',
    isEnterpriseInstall: false,
    teamId: 'T02GY35KFLP',
    enterpriseId: undefined,
    conversationId: 'D02JA3RBWDN'
  }
  ```


<a href="https://52rtxh9feb.execute-api.eu-west-2.amazonaws.com/api/slack/install"><img alt="install slack" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png" srcSet="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/add_to_slack@2x.png 2x" /></a>


Start local dynamo server:  ```sls dynamodb start --migrate```





GlobalSecondaryIndexes:
          - IndexName: userIndex
            KeySchema:
              - AttributeName: sk
                KeyType: HASH
            Projection:
              ProjectionType: ALL
            ProvisionedThroughput:
              ReadCapacityUnits: 1
              WriteCapacityUnits: 1