NAV
shell

Login

Get authorization

curl -X GET
    -H "Authorization: Bearer ..."
    https://afosto.app/api/oauth/session/authorize

200 response code

{
    "data": {
        "forward_uri": null,
        "client_name": null,
        "client_redirect_uri": null,
        "scope": {
            "id": null,
            "description": null
        },
        "is_authorization_approved": null,
        "is_id_token_issued": null,
        "expires_in": null
    },
    "page": null
}

302 response code

{
    "page": null
}

401 response code

{
    "error": {
        "code": 401,
        "message": "Unauthorized: invalid or expired authorization header",
        "details": null
    },
    "meta": null
}

403 response code

{
    "error": {
        "code": 403,
        "message": "Forbidden: insufficient scopes for resource",
        "details": null
    },
    "meta": null
}

500 response code

{
    "error": {
        "code": 500,
        "message": "Internal server error: something went wrong on our side",
        "details": null
    },
    "meta": null
}

400 response code

{
    "error": {
        "code": 400,
        "message": "Bad request: invalid filter, pagination or request body",
        "details": null
    },
    "meta": null
}

404 response code

{
    "error": {
        "code": 404,
        "message": "Not found: could not find requested entity",
        "details": null
    },
    "meta": null
}

Returns a new authorization response

HTTP Request

GET https://afosto.app/api/oauth/session/authorize

Query Parameters

Parameter Type Default Description
redirect_uri string
client_id string
response_type string
scope string
tenant string
state string
nonce string
silent string

Oauth

Obtain token

curl -X POST
    -H "Authorization: Bearer ..."
    -H "Content-Type: application/json"
    -d '{
    "data": {
        "client_id": null,
        "client_secret": null,
        "grant_type": null,
        "scope": null
    }
}'
    https://afosto.app/api/oauth/authorize

201 response code

{
    "data": {
        "token_type": null,
        "expires_in": null,
        "access_token": null,
        "refresh_token": null
    },
    "page": null
}

401 response code

{
    "error": {
        "code": 401,
        "message": "Unauthorized: invalid or expired authorization header",
        "details": null
    },
    "meta": null
}

403 response code

{
    "error": {
        "code": 403,
        "message": "Forbidden: insufficient scopes for resource",
        "details": null
    },
    "meta": null
}

500 response code

{
    "error": {
        "code": 500,
        "message": "Internal server error: something went wrong on our side",
        "details": null
    },
    "meta": null
}

400 response code

{
    "error": {
        "code": 400,
        "message": "Bad request: invalid filter, pagination or request body",
        "details": null
    },
    "meta": null
}

Returns a new access token

HTTP Request

POST https://afosto.app/api/oauth/authorize

Errors

The Afosto API uses the following error codes:

Error Code Meaning
400 Bad request: invalid filter, pagination or request body
401 Unauthorized: invalid or expired authorization header
403 Forbidden: insufficient scopes for resource
404 Not found: could not find requested entity
500 Internal server error: something went wrong on our side