Get all Webhooks for Account
GET https://chatapps.8x8.com/api/v1/accounts/:accountId/webhooks
Sending a GET request on this endpoint allows to retrieve a list of all the webhooks or a specific webhook configured for an account.
Request
Path Parameters
Possible values: >= 32 characters and <= 36 characters, Value must match regular expression ^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$
You must replace {accountId} with the accountid that you want to use.
Schema
- Array [
- Sets the subaccount scope of the webhook.
- Use
*to receive events across all subAccounts. - Use the
subAccountIdto receive events for a specific subaccount. - ]
Onion_Marketing
The url to use for the webhook (8x8 platform will send events to this URL).
http://example.com
The static HTTP Authorization header value sent with every webhook request. Masked as *** in GET responses.
***
Use this flag to enable or disable a Webhook.
true
false
oauth object
OAuth 2.0 Client Credentials configuration for webhook authentication. When configured, the platform will obtain an access token from the specified token endpoint and include it in the webhook request. The clientSecret is masked (***) in GET responses.
The token endpoint URL used to obtain the OAuth access token.
https://auth.example.com/oauth/token
The client ID for OAuth authentication.
my-client-id
The client secret for OAuth authentication. Masked as *** in GET responses.
***
Specifies where the client credentials are sent: header (HTTP Basic Auth) or body (form body).
Possible values: [header, body]
header
Optional space-separated list of OAuth scopes to request.
read write
[
{
"subAccountId":"Onion_Marketing",
"url":"http://example.com",
"httpAuthorization":"***",
"enabled":false,
"oauth":{
"url":"https://auth.example.com/oauth/token",
"clientId":"my-client-id",
"clientSecret":"***",
"credentialsLocation":"header",
"scope":"read write"
}
}
]
[
{
"type":"CADR",
"subAccountId":"Onion_Marketing",
"url":"http://example.com/dr/marketing",
"enabled":true,
"oauth":{
"url":"https://auth.example.com/oauth/token",
"clientId":"my-client-id",
"clientSecret":"***",
"credentialsLocation":"header",
"scope":"read write"
}
},
{
"type":"MSG",
"subAccountId":"Onion_Marketing",
"url":"http://example.com/dr/sales",
"enabled":true,
"httpAuthorization":"***"
},
{
"type":"MSG",
"subAccountId":"*",
"url":"http://example.com/dr/general",
"enabled":true
},
{
"type":"CABM",
"subAccountId":"*",
"url":"http://example.com/mo/general",
"enabled":false
}
]
Bad request error response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1002,
"message":"Invalid MSISDN format (not E.164 international number)",
"errorId":"b4478860-b76c-e811-814e-022a35cc1c71",
"timestamp":"2018-08-04T09:25:40.9235752+00:00"
}
Request was not authenticated response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1200,
"message":"Request was not authenticated properly",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-08-02T09:42:38.8988997+00:00"
}
Internal server error
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":2000,
"message":"Internal server error",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-07-02T09:42:38.8988997+00:00"
}
Source: https://developer.8x8.com/connect/reference/get-webhooks-1 · 8x8 CPaaS Developer Docs. Synced for support deflection.
0 Comments