Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Login with Facebook to get access token and phone numbers list #5

Open
keval-7span opened this issue Jun 14, 2023 · 1 comment

Comments

@keval-7span
Copy link

Feature Request

Integrate Login with Facebook to get access token and phone numbers list.

Functions

Function Name: getOAuthUrl
Arguments:

Key Datatype Required
client_id String Yes
redirect_uri String Yes
response_type String Yes
scope Array Yes
extras JSON No

Response:

{
    "oauth_url": "https://www.facebook.com/dialog/oauth?...."
}

Function Name: verifyOAuthCode
Arguments:

Key Datatype Required
code String Yes
client_id String Yes
client_secret String Yes
redirect_uri String Yes

Response:

{
    "access_token": "<your_access_token>",
    "token_type": "bearer",
    "expires_in": <expires_in_next_milliseconds>
}

Function Name: getWhatsappBusinessAccountIds
Arguments:

Key Datatype Required
access_token String Yes
fields String No

Response:

{
    "data": {
        "app_id": "1274719766720926",
        "type": "USER",
        "application": "MyFirstApp",
        "data_access_expires_at": 1694511327,
        "expires_at": 1691919327,
        "is_valid": true,
        "issued_at": 1686735327,
        "scopes": [
            "business_management",
            "whatsapp_business_management",
            "whatsapp_business_messaging",
            "public_profile"
        ],
        "granular_scopes": [
            {
                "scope": "business_management",
                "target_ids": []
            },
            {
                "scope": "whatsapp_business_management",
                "target_ids": [
                    "108522602164840"
                ]
            },
            {
                "scope": "whatsapp_business_messaging",
                "target_ids": [
                    "108522602164840"
                ]
            }
        ]
    }
}

Function Name: getPhoneNumberForSpecificBusinessAccount
Arguments:

Key Datatype Required
whatsapp_business_account_id String Yes

Response:

{
    "data": [
        {
            "id": "108439988840907",
            "verified_name": "Vepaar Dev",
            "code_verification_status": "EXPIRED",
            "display_phone_number": "+91 87350 15900",
            "quality_rating": "UNKNOWN"
        }
    ]
}
@binal-7span
Copy link
Contributor

binal-7span commented Jun 14, 2023

@keval-7span - There is one query from my end.

Are displays and extras needed to add to the getOAuthUrl function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants