Access authentication

You authenticate requests to the deployed experiment by including the deployed model’s token in the API request.

All API requests must be made over HTTPS. Requests using HTTP will fail as will requests without authentication.

Keep the token secure! It is not password protected and can be used by whomever that have access to it. Do not share it the token if you don’t want it to become public.

Basic access authentication

Authentication to the Peltarion API is most often performed via HTTP basic access authentication. Basic authentication is a simple authentication scheme built into the HTTP protocol.

Use your token as the basic auth username value. You do not need to provide a password.

Example request

Headers = {
    'Content-Type': payload.content_type,
},data,headers, auth=(token, ''))

Read more here on how to Deploy from the command line with CURL.

Bearer access authentication

Bearer tokens are the predominant type of access token used with OAuth 2.0.

If you want to use bearer authentication instead of basic you must provide your token in the authorization header of the request. Include the Bearer prefix and separate it from the token with a blank space.

Example request

headers = {
    'Content-Type': payload.content_type,
    'Authorization': "Bearer {}".format(token),
Get started for free