Official Content

API object security is based on the  OAuth 2.0 protocol. So, when an API object with a security scheme has been defined, it is necessary to make some configurations in the GAM Backend.

Suppose you have an API object in which a security scheme has been defined. Then, you must follow the steps described below.

Step 1

Select Build > Run GAM Backend in the GeneXus Toolbar. This will direct you to a tab in your browser where you should add the following information:

User: admin
Password: admin123

When you click on "SIGN IN", you will be directed to Applications to select the KB. In this case, it is KBAPIObjectSecurityScheme:

SettingthesecurityschemeAPIobject

Step 2

Click on "EDIT," and in Configuration, follow the steps below:

  1. Enable "Allow authentication v.2.0?" and "Can get user roles?".
  2. Copy Client ID and Client secret.
  3. Click on Confirm.

SettingthesecurityschemeAPIobject2

To be able to connect to that server from anywhere, you will have to add the Client ID and Client secret data, so you will have to copy that data into memory. 

See Also

API object security scheme
HowTo: Access secure REST services defined via API Objects

 
Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant