HowTo: Authenticate to Instagram using GAM

Unofficial Content
This documentation is valid for:

This article explains how to authenticate your user with Instagram using GeneXus Access Manager (GAM).

You need to use OAuth 2.0 Authentication Type and some configuration on both sides: the Meta for Developers portal and the GAM's backend.

Configuration at GAM Backend

1. Enter to the GAM's Backend and go to the Authentication Types section. Create a new OAuth 2.0 Authentication Type, define basic information in the General section: Name, Description, Images (optional), etc.

2. In the Configuration section you need to define the following for the General, Authorization, Token and User Information tab:


Client ID:     client_id        Value: <clientid>
Client Secret: client_secret    Value: <clientsecret>
Redirect URL:  redirect_uri     Value: https://<server>/webapp (ie.


Response type: response_type    Value: code
Scope:         scope            Value: basic
State:         state
Include ClientID and RedirectURL
Access code TAG: code
Error description TAG: error_description


Header Cotent type: Content-type    Value: application/x-www-form-urlencoded
Grant type:         grant_type      Value: authorization_code
Include All
Access token TAG: access_token
Token type TAG: token_type
Expires in TAG: expires_in
Refresh Token TAG: Not available for this Provider. When the token expires, it cannot be refreshed.
Error description TAG: error_description
Validate external token = True  // When the token expires, the GAM session ends.
Refresh token URL = leave it empty. Uses the same URL used to ask for a Token.

User Information

Method: Get
Header Content type: Content-type    Value: application/json;charset=utf-8
Do not include anything.
Email TAG:
External ID TAG: id
Name TAG:  username
First name TAG: full_name
Generate automatic Last name : True
Birthday TAG: birthday
URL image TAG: profile_picture
Error description TAG: error_description 


As of GeneXus 15 Upgrade 11.

See Also

GAM - OAuth 2.0 Authentication Type