MENU
      OAuth2.0 authentication
        • PDF

        OAuth2.0 authentication

        • PDF

        Article summary

        Available in Classic and VPC

        It is an API to issue or renew Access Tokens. For the use flow of B2B PRISM Live Studio, see Login process.

        Requests

        The request format is as follows:

        GET {serviceApiDomain}/prism/v1/service/oauth2/token
        HTTP

        Request headers

        The description of the header is as follows:

        NameTypeDescriptionRequired
        x-prism-client-idStringAs a client ID provided for authenticating OAuth2.0 to the B2B PRISM Live Studio in the customer's service, it is a value that is not changedY
        x-prism-client-secretStringA client secret that is provided for authenticating OAuth2.0 to the B2B PRISM Live Studio in the customer's service; it can be changed by agreement as required due to security issuesY

        Request query parameters

        The description of the parameters is as follows:

        NameTypeDescriptionRequired
        grant_typeStringA type of granting OAuth2.0 permissions; uses "authorization_code" for issuing an Access Token and "refresh_token" for renewing itY
        redirect_uriStringRequired when requesting with grant_type = authorization_code. Uses https://global.apis.naver.com/prism/prism-auth-api/oauth/partner/{serviceId} in B2B PRISM Live StudioN
        codeStringForwards the code that received a response with redirect uri when issuing Access TokenN
        refresh_tokenStringUsed when requesting with grant_type = refresh_tokenN

        Responses

        This is a description of the response format.

        NameTypeDescriptionRequired
        access_tokenStringUser Access TokenY
        refresh_tokenStringUser Refresh TokenY
        expires_inNumberTime (sec) until the expiration of Access TokenN
        token_typeStringToken type; usually "bearer"Y

        Examples

        Introduces examples of syntax.

        When issuing Access Token

        Introduces examples of syntax for issuing Access Token.

        Request examples

        An example of the syntax is as follows:

        curl -X GET {serviceApiDomain}/prism/v1/service/oauth2/token
                ?grant_type=authorization_code
                &code={your_authorized_code} \
            -H "x-prism-client-id: {client-id}"
            -H "x-prism-client-secret: {client-secret}"
        Bash

        Response examples

        An example of the syntax is as follows:

        {
            "access_token": "JXvBU54_hOok4gpOTHAOASEHbaE",
            "expires_in": 12345,
            "refresh_token": "va32t62Zsc3DVv0irdCt3yBjy_c",
            "token_type": "bearer"
        }
        JSON

        When renewing Access Token

        Introduces examples of syntax for renewing Access Token.

        Request examples

        An example of the syntax is as follows:

        curl -X GET {serviceApiDomain}/prism/v1/service/oauth2/token
                ?grant_type=refresth_token
                &refresh_token={your_refresh_token} \
            -H "x-prism-client-id: {client-id}"
            -H "x-prism-client-secret: {client-secret}"
        Bash

        Response examples

        An example of the syntax is as follows:

        {
            "access_token": "JXvBU54_hOok4gpOTHAOASEHbaE",
            "expires_in": 12345,
            "refresh_token": "va32t62Zsc3DVv0irdCt3yBjy_c",
            "token_type": "bearer"
        }
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.