Accounts

Authentication to apps.

get
Get Accounts

https://api.appmixer.com/auth/:componentType
Get list of accounts the user has previously authenticated with for this component type. curl "https://api.appmixer.com/auth/appmixer.slack.list.SendChannelMessage?componentId=e15ef119-8fcb-459b-aaae-2a3f9ee41f15" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
componentType
required
string
Component Type.
Query Parameters
componentId
required
string
Component ID.
200: OK
"componentType": "appmixer.slack.list.SendChannelMessage",
"auth": {
"accounts": {
"5a6e21f3b266224186ac7d03": {
"accessTokenValid": true,
"accountId": "5a6e21f3b266224186ac7d03",
"tokenId": "5a6e21f3b266224186ac7d04",
"componentAssigned": true,
"componentId": "e25dc901-f92a-46a2-8d29-2573d4ad65e5",
"scopeValid": true,
"authorizedScope": [
"channels:read",
"chat:write:user"
],
"name": "U0UFJ0MFG - client IO",
"displayName": "client IO"
}
}
}
}

get
Get All Accounts

https://api.appmixer.com/accounts
Get list of all accounts the user has authenticated with to any component. curl "https://api.appmixer.com/accounts" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
200: OK
[
{
"accountId": "5a6e21f3b266224186ac7d03",
"name": "U0UFJ0MFG - client IO",
"displayName": null,
"service": "appmixer:slack",
"userId": "58593f07c3ee4f239dc69ff7",
"profileInfo": {
"id": "U0UFJ0MFG - client IO"
},
"icon": "data:image/png;base64,...rkJggg==",
"label": "Slack"
},
{
"accountId": "5a7313abb3a60729efe76f1e",
"name": "t.o.mas@client.io",
"displayName": null,
"service": "appmixer:pipedrive",
"userId": "58593f07c3ee4f239dc69ff7",
"profileInfo": {
"name": "tomas",
"email": "t.o.mas@client.io"
},
"icon": "data:image/png;base64,...rkJggg==",
"label": "Pipedrive"
}
]

put
Update Account Info

https://api.appmixer.com/accounts/:accountId
Update account information. Currently, only the display name can be updated. The display name is visible in the Designer inspector when selecting available accounts for a component type and also on the Accounts page. curl -XPUT "https://api.appmixer.com/accounts/5a6e21f3b266224186ac7d03" -H "Authorization: Bearer [ACCESS_TOKEN]" -H "Content-Type: application/json" -d '{ "displayName": "My Account Name" }'
Request
Response
Path Parameters
accountId
required
string
ID of the account to update.
Form Data Parameters
optional
string
Human readable name of the account.
200: OK

post
Test Account

https://api.appmixer.com/accounts/:accountId/test
Test account. Check if all the credentials (tokens) are still valid for the account. curl -XPOST "https://api.appmixer.com/accounts/5a6e21f3b266224186ac7d03/test" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
accountId
required
string
Account ID.
200: OK
{ "5a6e21f3b266224186ac7d04": "valid" }

delete
Remove Account

https://api.appmixer.com/accounts/:accountId
Remove account and stop all the flows that this account is used in. curl -XDELETE "https://api.appmixer.com/accounts/5a6e21f3b266224186ac7d03" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
accountId
required
string
Account ID.
200: OK
{ "accountId": "5abcd0ddc4c335326198c1b2" }

get
List All Flows Using Account

https://api.appmixer.com/accounts/:accountId/flows
List all the flows where the account is used. curl "https://api.appmixer.com/accounts/5a6e21f3b266224186ac7d03/flows" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
accountId
required
string
Account ID.
200: OK
[
{
"flowId": "9251b4b6-4cdb-42ad-9431-1843e05307be",
"name": "Flow #1"
},
{
"flowId": "777d3024-43f6-4034-ac98-1cb5f320cb3a",
"name": "Flow #2"
},
{
"flowId": "9089f275-f5a5-4796-ba23-365412c5666e",
"name": "Flow #3"
}
]

post
Generate Authentication Session Ticket

https://api.appmixer.com/auth/ticket
Generate an authentication session ticket. This is the first call to be made before the user can authentication to a service. The flow is as follows: 1. Generate an authentication session ticket. 2. Get an authentication URL. 3. Start an authentication session. 4. Open the authentication URL in a browser to start the authentication flow. 5. Once the user completes the authentication flow, the browser redirects the user to a special Appmixer page which posts a message of the form "appmixer.auth.[success/failure].[ticket]" via the window.postMessage() call: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage. Note that this is a low-level mechanism that you don't have to normally deal with. The Appmixer JS SDK handles all this for you. curl "https://api.appmixer.com/auth/ticket" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
200: OK
{ "ticket": "58593f07c3ee4f239dc69ff7:1d2a90df-b192-4a47-aaff-5a80bab66de5" }

get
Get Authentication URL

https://api.appmixer.com/auth/:componentType/auth-url/:ticket
Get an authentication URL. curl "https://api.appmixer.com/auth/appmixer.slack.list.SendChannelMessage/auth-url/58593f07c3ee4f239dc69ff7:1d2a90df-b192-4a47-aaff-5a80bab66de5" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
ticket
required
string
Authentication ticket.
componentType
required
string
Component type.
Query Parameters
required
string
Component ID.
200: OK
{
"authUrl": "https://slack.com/oauth/authorize?response_type=code&client_id=25316748213.218351034294&redirect_uri=http%3A%2F%2Flocalhost%3A2200%2Fauth%2Fslack%2Fcallback&state=38133t07c3ee4f369dc69ff7%3A1d2a90df-b192-4a47-aaff-5a80bab66de5&scope=channels%3Aread%2Cchat%3Awrite%3Auser"
}

put
Start Authentication Session

https://api.appmixer.com/auth/:componentType/ticket/:ticket
Start authentication session. curl -XPUT "https://api.appmixer.com/auth/appmixer.slack.list.SendChannelMessage/ticket/58593f07c3ee4f239dc69ff7:68982d38-d00c-4345-9a4a-82360d7e1649" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
ticket
required
string
Authentication session ticket.
componentType
required
string
Component type.
200: OK
{
"service": "appmixer:slack"
}

delete
Clear Authentication From Component

https://api.appmixer.com/auth/component/:componentId
Clear authentication associated with the component. Note that this call does not remove the account, it only removes the association of an account with a component. curl -XDELETE "https://api.appmixer.com/auth/component/e25dc901-f92a-46a2-8d29-2573d4ad65e5" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
componentId
required
string
Component ID.
200: OK
{ "componentId": "e25dc901-f92a-46a2-8d29-2573d4ad65e5" }

put
Assign Account To Component

https://api.appmixer.com/auth/component/:componentId/:accountId
Assign an account to a component. curl -XPUT "https://api.appmixer.com/auth/component/e25dc901-f92a-46a2-8d29-2573d4ad65e5/5a6e21f3b266224186ac7d03" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
accountId
required
string
Account ID.
componentId
required
string
Component ID.
200: OK
{
"accountId":"5a6e21f3b266224186ac7d03",
"componentId":"e25dc901-f92a-46a2-8d29-2573d4ad65e5"
}