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

    accountId stringrequired

    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 [
  • subAccountIdstringrequired
    • Sets the subaccount scope of the webhook.
    • Use * to receive events across all subAccounts.
    • Use the subAccountId to receive events for a specific subaccount.
    Example: Onion_Marketing
    urlstring<uri>required

    The url to use for the webhook (8x8 platform will send events to this URL).

    Example: http://example.com
    httpAuthorizationstring

    The static HTTP Authorization header value sent with every webhook request. Masked as *** in GET responses.

    Example: ***
    enabledboolean

    Use this flag to enable or disable a Webhook.

    Default value: true
    Example: 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.

    urlstring<uri>required

    The token endpoint URL used to obtain the OAuth access token.

    Example: https://auth.example.com/oauth/token
    clientIdstringrequired

    The client ID for OAuth authentication.

    Example: my-client-id
    clientSecretstringrequired

    The client secret for OAuth authentication. Masked as *** in GET responses.

    Example: ***
    credentialsLocationstringrequired

    Specifies where the client credentials are sent: header (HTTP Basic Auth) or body (form body).

    Possible values: [header, body]

    Example: header
    scopestring

    Optional space-separated list of OAuth scopes to request.

    Example: 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

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    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

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    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

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    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.

Was this article helpful?
or
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.

Didn't find what you were looking for?

Submit a request