Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Facebook API (unable to validate token)

Discussion in 'Authentication' started by Webtopsolutions, Apr 27, 2023.

  1. Webtopsolutions


    Sep 8, 2022
    I'm having a problem with the Facebook Authentication Provider, when I make a post request to the API, it gives a 401 response code.

    Code (CSharp):
    2. {
    3. "title": "PERMISSION_DENIED",
    4. "detail": "unable to validate token",
    5. "details": [],
    6. "status": 401
    7. }
    The app ID and app secret are set correctly.
    I have tested a real facebook profile in live and development mode and i have tried to use the token generated from facebook developer console and i have the same result.

    I found a problem in the permission granted, my Facebook app type is gaming service and I have gaming_profile permission instead of public_profile , i tested with non gaming service type with public_profile perminssion and its working

    Last edited: Apr 28, 2023
    vuthang and mahdik_unity like this.