Basic UserInfo endpoint¶
Endpoint URL: GET /resources/userinfo
Endpoint returns basic user info which contains: email and unique user identifier.
Request¶
Example request¶
$ curl --location --request GET 'https://connect.okonto.pl/resources/userinfo?client_id=www.example.com.front.onetapi.pl' \
--header 'Authorization: Bearer 047b0a8339c7fb9f623d3e2e8ae69c2z3eh5r4df1501pa34cba8439f7d0c2c1fcs' \
Parameters:
- client_id- value you received after registering your service
Headers:
- Authorization- Authorization header should be provided in Bearer token scheme.
Note
For Authorization header value use access_token received from token endpoint.
Response¶
Example response of getting user information¶
{
    "sub": "de456acd-d858-4a7e-a868-f16f6ad655db",
    "email": "user@example.com"
}
Errors handling¶
- 400 BAD REQUEST - for all client side errors like: lack of authorization code, wrong authorization code, invalid credentials in Authorization header. 
- 503 SERVICE UNAVAILABLE - for problems encountered on the server side. 
