Blink

Blink

    blinkSDK.getAuthorizationCode()

    Opens a login modal, asking for the user to login/create an account, and in case of success, it will close and return a valid authorization code.

    Usage

        blinkSDK.getAuthorizationCode(
            (response) => {
                console.log("Successfully got the authorization code: " + response.code);
            },  
            (error) => {
                const {code, message} = error;
                console.log("Error while trying to login: " + message);
            });
    

    Signature

        blinkSDK.getAuthorizationCode(callback, [errorCallback])
    

    Parameters

    parametertyperequireddescription
    callbackfunction☑Called in case of success, will receive a response object containing the authorization code
    errorCallbackfunction☐Called in case of error, will receive an error object containing the error details

    Returns

    void

    Objects definitions

    Response object

    {
      "code" : // authorization code
    }
    
    nametypedescription
    codestringA valid authorization code

    Error object

    {
      "code" : // error code
      "message" : // error message
    }   
    
    nametypedescription
    codeintegerError code
    messagestringError message
    • Usage
    • Signature
    • Parameters
    • Returns
    • Objects definitions
      • Response object
      • Error object
    Blink
    Docs
    Getting StartedPublic API
    Integration
    Donation
    Blink
    Copyright © 2021 Blink Ledger Systems Inc. All rights reserved