See api-docs Menu

Get Account Brand

Early Preview

This API is in early preview and may be subject to change. Please contact your account manager if you are interested in trying the Branding API.

Use this API to retrieve a single Account Brand configuration.









Resource URL

https://<api-domain>/api/2/branding/brands/:id

Header Parameters

Authorization

required

string

Set to bearer <access_token>.

Set <access_token> to the access token you generated using the Generate Token API.

The access token must have been generated using an API credential pair created using the scope required to call this API. This API can be called using any one of the following scopes: Manage All.

In order to use the Branding API your API Credentials must be created after 21st October 2020.

Content-Type

required

string

Set to application/json.

Resource Parameters

brand_id

required

integer

Unique identifier for the branding object.

Sample Responses

{
  "id": 9,
  "enabled": true,
  "custom_support_enabled": false,
  "custom_color": "#1298b4",
  "custom_accent_color": "#b60012",
  "custom_masking_color": "#beefed",
  "custom_masking_opacity": 40,
  "mfa_enrollment_message": "You must register with the OneLogin Protect app in order to login",
  "enable_custom_label_for_login_screen": true,
  "custom_label_text_for_login_screen": "ACME Username or Email",
  "login_instruction": "To login, enter your ACME Username or Email. Reach out to help.desk@acme.org if you have trouble logging in.",
  "login_instruction_title": "ACME Login Instructions",
  "hide_onelogin_footer": false,
  "background":
    { urls:
      { original:
  "https://cdn.onelogin.com/images/account_branding/account_background/original/9ada91a5d34b497f6f0b93934165f0c713ed3c2d.?1599165114",
              "login": 
  "https://cdn.onelogin.com/images/account_branding/account_background/login/a2011597bad264455796281b94471284c6919857.jpg?1599165114",
                 "branding":
  "https://cdn.onelogin.com/images/account_branding/account_background/branding/8547d161732776facb3d9127146c06a09aa63362.jpg?1599165114" },
             "file_size": 30338,       
             "updated_at": "2020-09-03T20:31:54.146Z",
             "content_type": "image/jpeg" },
          "logo":
            { "urls":
               { "original": 
  "https://cdn.onelogin.com/images/account_branding/account_logo/original/25506f4f5b795b39f8ab6ea8a6c85f78094941bf.?1599165114",
               "login":
  "https://cdn.onelogin.com/images/account_branding/account_logo/login/103d08ec5efb4ab204421f3dd15eddc973c8d0c5.png?1599165114",
                "navigation": 
  "https://cdn.onelogin.com/images/account_branding/account_logo/navigation/08fef613402a898832d215a3359b56e6d69ac232.png?1599165114" },
              "file_size": 4408,
              "updated_at": "2020-09-03T20:31:54.373Z",
              "content_type: "image/png" }
}

Typically, this error means that your access token value is invalid.

{
    "message": "Unauthorized",
    "statusCode": 401,
    "name": "UnauthorizedError"
}

The requested brand id does not exist.

{
    "message": "The resource with the given id could not be found",
    "statusCode": 404,
    "name": "NotFoundError"
}

Response Elements

id

Unique identifier for the branding object.

name Brand’s name for humans. This isn’t related to subdomains.
enabled Indicates if the brand is enabled or not.(default=false)
custom_support_enabled Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request.

custom_color

Primary brand color

custom_accent_color

Secondary brand color

custom_masking_color

Color for the masking layer above the background image of the branded login screen.

custom_masking_opacity

Opacity for the custom_masking_color

enable_custom_label_for_login_screen

Indicates if the custom Username/Email field label is enabled or not.

custom_label_text_for_login_screen

Custom label for the Username/Email field on the login screen. See example here.

login_instruction_title

Link text to show login instruction screen.

login_instruction

Text for the login instruction screen, styled in Markdown.

hide_onelogin_footer

Indicates if the OneLogin footer will appear at the bottom of the login page.

mfa_enrollment_message

Text that replaces the default text displayed on the initial screen of the MFA Registration.

background

Base64 encoded image data (JPG/PNG, <5MB)

logo

Base64 encoded image data (PNG, <1MB)

Postman Collection

Replace sample variables indicated by {{ }} with your actual values.

Download for the Branding API

Sample Code

cURL

Replace sample values indicated by < > with your actual values.

Get Account Brand

curl 'https://<api-domain>/api/2/branding/brands/:id' \
-X GET \
-H "Authorization: bearer <access_token>"
-H "Content-Type: application/json" \

Have a Question?

Have a how-to question? Seeing a weird error? Ask us about it on StackOverflow.

Found a bug? Submit a support ticket.

Have a product idea or request? Share it with us in our Ideas Portal.