--- title: "OAuth2 for API access" slug: "common-login-api-oauth-2" updated: 2026-04-29T13:34:19Z published: 2026-04-29T13:34:19Z canonical: "docs.lobstersoftware.com/common-login-api-oauth-2" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # OAuth2 for API access An OAuth2 bearer token can be used to access **Lobster Data Platform/Integration**. To do this, access must be set up via the Partner Management API in accordance with the respective instructions for **Lobster Data Platform/Integration**. The channel must be linked to a user account (see [Users](/v1/docs/en/base-user)) via the additional identifier `SYS_PRO_USER`. It is recommended to use a user with only one role and one company. Otherwise, simply use the first role/company in each case. Optionally, this can also be controlled via the `X-ENV-Preferred-Role` and `X-ENV-Preferred-Company` headers. Authentication takes place via the assigned bearer token assigned and must be transferred via the `Authorization: Bearer {token}` header. If SSO providers are registered in the system, valid bearer tokens from the corresponding issuers can also be used. The normal linking of the user with the SSO account applies here. ## Creation of the partner channel HTTP(s): ![images/download/attachments/201679982/image-2023-6-21_8-29-12-version-1-modificationdate-1748276952819-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2023-6-21_8-29-12-version-1-modificationdate-1748276952819-api-v2.png) The information required for OAuth2 authorization can be found here in the "Partner access (Partner to me)" area: ![images/download/attachments/201679982/image-2023-6-21_8-30-44-version-1-modificationdate-1748276952828-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2023-6-21_8-30-44-version-1-modificationdate-1748276952828-api-v2.png) > [!WARNING] > **IMPORTANT:** > > The user used should only have exactly one role and one company, otherwise the preferred role and company must be set via the header (X-ENV-Preferred-Role / X-ENV-Preferred-Role). The Lobster user to be used is determined from the additional identifier SYS_PRO_USER; if this is not set, the partner identifier is used. ![images/download/attachments/201679982/image-2023-6-21_8-33-3-version-1-modificationdate-1748276952833-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2023-6-21_8-33-3-version-1-modificationdate-1748276952833-api-v2.png) To be able to access the system, the OAuth2 authentication flow must be run through. This can be tested with SoapUI, for example: ![images/download/attachments/201679982/image-2023-6-21_8-41-34-version-1-modificationdate-1748276952835-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2023-6-21_8-41-34-version-1-modificationdate-1748276952835-api-v2.png) The OAuth2 bearer token is now retrieved via the "Get Access Token" function: ![images/download/attachments/201679982/image-2023-6-21_8-42-29-version-1-modificationdate-1748276952837-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2023-6-21_8-42-29-version-1-modificationdate-1748276952837-api-v2.png) This token (using the`Authorization: Bearer {token}` header) can now be used to access the system as "my_api_user", e.g. to retrieve your own session information: ![images/download/attachments/201679982/image-2023-6-21_9-29-26-version-1-modificationdate-1748276952839-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2023-6-21_9-29-26-version-1-modificationdate-1748276952839-api-v2.png) ## Related - [Access control for APIs](/api-access-control.md)