Git Product home page Git Product logo

Comments (2)

M-Shahbaz avatar M-Shahbaz commented on September 24, 2024

using devtest account:
in network response showing:

{"status":{"success":false,"code":716,"message":"Authentication code cannot be obtained successfully for the given mailbox.","fields":null,"errorCode":"LOGIN_API_GET_AUTHENTICATION_CODE_FAIL"},"sessionid":"SESSION_IDxxxxx","result":"","spent":110}

Authorize URL for 3-Legged OAuth:

https://platform.devtest.ringcentral.com/restapi/oauth/authorize?client_id=APP- KEY&response_type=code&redirect_uri=URL-ENCODE-RIDIRECT-URI&prompt=login+consent&state=RANDOM-STATE-NUMBER

On server side Node.js is not available only PHP (LAMP)

I tried using Browser JS SDK, and having exactly same issue that is:

Authentication code cannot be obtained successfully for the given mailbox.

. (May be something with this account?), Although I can get access token using username and password (2-legged OAuth) of same account but require 3-legged OAuth

    <script type="text/javascript" src="build/promise.js"></script>
    <script type="text/javascript" src="build/fetch.js"></script>
    <script type="text/javascript" src="build/pubnub.js"></script>
    <script type="text/javascript" src="build/ringcentral.js"></script><!-- or ringcentral.min.js -->
    <script type="text/javascript">

        var sdk = new RingCentral.SDK({
                    server: 'https://platform.devtest.ringcentral.com', // SANDBOX
                    //server: 'https://platform.ringcentral.com', // PRODUCTION
                    appKey: 'APP KEY'
                    });
        var platform = sdk.platform();

        var authorizeURI = platform.authUrl({
            redirectUri: 'REDIRECT URI',
            prompt: 'login consent',
            state: 'RANDOM STATE'
        });
        // Open browser to authorizeURI (which should contain all the properly formatted queryString parameters in place)
        window.open(authorizeURI, '_self', '');
    </script>

from ringcentral-php.

grokify avatar grokify commented on September 24, 2024

The error encountered can result due to TLS 1.2 enforcement on our server. Check your client to verify it supports TLS 1.2.

I've reformatted it below for easier reading.

{
    "status":{
        "success":false,
        "code":716,
        "message":"Authentication code cannot be obtained successfully for the given mailbox.",
        "fields":null,
        "errorCode":"LOGIN_API_GET_AUTHENTICATION_CODE_FAIL"
    },
    "sessionid":"SESSION_IDxxxxx",
    "result":"",
    "spent":110
}

I'm closing this due to the age of this issue. Feel free to post if this is still an issue.

from ringcentral-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.