Parameters
This variable takes one required parameter that is a URL to send the HTTP GET request to.Example Output
There is no example output as it solely depends on what the requested URL returns.Error Output
-
In case an invalid URL is provided, or the remote server cannot be reached, returns the following:
Developers
All status codes will be ignored and only the raw body content of the requested URL will be returned. Fossabot also sends multiple custom HTTP headers that you can use to build deeper integrations, a list of them can be found below.IP Ranges
Fossabot’s proxy does not use a consistent IP range to send requests. You cannot rely on it for authenticating endpoints! We recommended that you use our API Endpoints to validate whether a given request actually came from Fossabot. For that reason we do NOT print customapi URLs on public commands pages.List of Common Headers
These headers are present in all requests.List of Message Headers
These headers are present in requests sent from messages and therefore attached to a particular user.API Endpoints
Fossabot exposes two API endpoints that you may use to either validate that a given customapi request originated from Fossabot, or to obtain more data that would allow you to customize how you respond to a given request.These endpoints are rate limited.Refer to Rate Limits for more information.
Validating requests
This is a single use endpoint.This means that you will only receive a valid token response the first time you call this endpoint. If you call this endpoint twice using the same token, the second request will return an error.
Valid token
A valid token will result in HTTP status code200 with the following body:
GET request to the value of context_url to obtain more data about the incoming request. Refer to Getting context for more information.
Invalid token
An invalid token will return HTTP status code400 with the following body:
Getting context
Valid token
A valid token will return HTTP status code200 with the following body:
message is a nullable fieldIn the event the customapi request was dispatched from an automated action (such as a timer), message will be null.Invalid token
An invalid token will return HTTP status code400 with the following body:
Rate Limits
Fossabot uses a leaky bucket rate limiter to protect its services from abuse. You will receive a429 HTTP status code with the following body if you exceed the rate limit: