Skip to main content

Authentication

Authentication for the RESTful Ownly API v1 is done via the HTTP basic authentication scheme.

You first have to generate your authentication token Here.

Authentication tokens can be created in our test site linked above or in Live mode. Tokens are only valid to give permissions in the mode they originated from. Tokens created on the test mode will not be valid towards the live website.

Privacy

Authentication tokens must be kept secure. Do not share Authentication tokens in publicly accessible areas such as source code, tutorials, email, etc.

Request URL

POST https://api.theownly.io/oauth2/token

Headers

NameValueRequired?
Acceptapplication/jsonYes
Content-Typeapplication/jsonYes

Parameters

NameTypeRequired?Description
grant_typepasswordYes
usernameStringYes
passwordStringYes

Example Request


curl -X 'POST' \
'https://api.theownly.io/oauth2/token' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "password",
"username": "string",
"password": "string"
}'

Example Response


{
"access_token": "string",
"refresh_token": "string",
"created_at": 0,
"expires_in": 0
}