Authentication

Authentication

Benlly Platform provide authentication method as per OAuth 2.0 Framework’s specification  (RFC 6749).  

Register User

You can execute this process by making a POST request to the endpoint /api/oauth/token.

Request Header

There are no required Request Headers.

URL Parameters

There are no required URL Parameters.

Request Parameters

 Request Parameters
Name Description Type Example
grant_type Grant Type as per  (RFC 6749)  specification. For Register User, we use custom grant type: register String register
client_id Client ID that was registered beforehand with Benlly Platform Integer 123465789
client_secret Client Secret that was provided when register client String 0sgF8AClPDRcwRFYZpcmKwySdQDEPDzo3IaG0uEf
username A pair of client_id / username MUST be unique String Myusername
password User’s password that we want to create String Mypassword
scope Should be NULL in this case String

Response Format

 
Response Format
Name Description Type Example
token_type The type of return access token. String Bearer
access_token Access Token. This will be used for future authentication String <access_token>
expires_in How long this access token will last, measure in seconds Integer 31536000
refresh_token Use this to get new access token when the old one expired String <refresh_token>
Example

{
    "token_type": "Bearer",
    "expires_in": 31536000,
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImY2MDkzZmEwNmM3NTc1OTk5OTAzNzMwZGQ0ZTY1ZjkwODU0YWZlMTU3MDhhNjcxYTdiZDhjY2I2MzhiYmFiMjRkYTU0YzYyZTFhM2ZiMjJjIn0.eyJhdWQiOiIxNjc4NCIsImp0aSI6ImY2MDkzZmEwNmM3NTc1OTk5OTAzNzMwZGQ0ZTY1ZjkwODU0YWZlMTU3MDhhNjcxYTdiZDhjY2I2MzhiYmFiMjRkYTU0YzYyZTFhM2ZiMjJjIiwiaWF0IjoxNTAxNTcwMzkwLCJuYmYiOjE1MDE1NzAzOTAsImV4cCI6MTUzMzEwNjM5MCwic3ViIjoiMyIsInNjb3BlcyI6W119.rCkFLJXMCEWTP2Vh0_K20fFD1VdE1GE5fH-MRpm4mlaC3cRYRgEdFjIxnqi9du6LZs7SIkDdlTZ2AgaiUb3Vf4LEBmDnJe3UyBgDKPZWKiyRrV2boV3dzvF-FSXdIQYl7Z9iX3BSN8b2EmQTXx3hz1b_L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