OAuth2.0 authentication
- Print
- PDF
OAuth2.0 authentication
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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
Request headers
The description of the header is as follows:
Name | Type | Description | Required |
---|---|---|---|
x-prism-client-id | String | As 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 changed | Y |
x-prism-client-secret | String | A 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 issues | Y |
Request query parameters
The description of the parameters is as follows:
Name | Type | Description | Required |
---|---|---|---|
grant_type | String | A type of granting OAuth2.0 permissions; uses "authorization_code" for issuing an Access Token and "refresh_token" for renewing it | Y |
redirect_uri | String | Required when requesting with grant_type = authorization_code. Uses https://global.apis.naver.com/prism/prism-auth-api/oauth/partner/{serviceId} in B2B PRISM Live Studio | N |
code | String | Forwards the code that received a response with redirect uri when issuing Access Token | N |
refresh_token | String | Used when requesting with grant_type = refresh_token | N |
Responses
This is a description of the response format.
Name | Type | Description | Required |
---|---|---|---|
access_token | String | User Access Token | Y |
refresh_token | String | User Refresh Token | Y |
expires_in | Number | Time (sec) until the expiration of Access Token | N |
token_type | String | Token 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}"
Response examples
An example of the syntax is as follows:
{
"access_token": "JXvBU54_hOok4gpOTHAOASEHbaE",
"expires_in": 12345,
"refresh_token": "va32t62Zsc3DVv0irdCt3yBjy_c",
"token_type": "bearer"
}
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}"
Response examples
An example of the syntax is as follows:
{
"access_token": "JXvBU54_hOok4gpOTHAOASEHbaE",
"expires_in": 12345,
"refresh_token": "va32t62Zsc3DVv0irdCt3yBjy_c",
"token_type": "bearer"
}
Was this article helpful?