API-Auth examples
Last updated
Was this helpful?
Last updated
Was this helpful?
The main goal of these examples is to demonstrate how a Task Developer can create Truebit API Tasks that interact with authenticated endpoints. We’ll walk through how to handle each of the supported authentication methods: custom-header, basic-auth, and aws-signature.
Use the command to execute the API task locally within the context of the Truebit Node. This allows you to verify that the authenticated endpoints behave as expected.
basic-auth
aws-signature
Once the authenticated endpoints have been successfully tested, create the Truebit API Task by running the command.
basic-auth
aws-signature
After deploying the API Task, upload the required authentication credentials using the api-auth
command. This ensures the Task Requester can execute the task without encountering authentication issues.
basic-auth
aws-signature
You’re now ready to execute the Truebit API Task using the execute-by-name endpoint and retrieve the Truebit transcript.
Deploy the created API Task using the command. This makes it available for execution by Task Requesters.