Creating a Public Endpoint

By default, endpoints are private and require a bearer token to access. You can remove the authentication requirement for endpoints using the Authorized=False argument:

auth.py
from beam import endpoint


@endpoint(authorized=False)  # Disable authentication
def create_public_endpoint():

    print("This API can be invoked without an auth token")
    return {"success": "true"}

Invoking a Public Endpoint

Public endpoints have slightly different URL schemes than private ones:

https://app.beam.cloud/endpoint/public/[STUB-ID]
https://app.beam.cloud/endpoint/public/4f78aaae-f35c-4eb0-9236-cdd34509bad8

You can find your Stub ID on the deployment detail page in the web dashboard.

You can view your the API URL by clicking the Call API button on the deployment detail page in the web dashboard.

A full request to a public endpoint might look something like this:

curl -X POST \
--compressed 'https://app.beam.cloud/endpoint/public/4f78aaae-f35c-4eb0-9236-cdd34509bad8' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/json' \
-d '{}'