Professional Documents
Culture Documents
Word Filter WebAPI-Reference e
Word Filter WebAPI-Reference e
66
Word Filter Web APIs Reference21
95
09
00
Document serial number: 000009952166
00
SCE CONFIDENTIAL
Table of Contents
Common Features ................................................................................................................................ 3
HTTP Status Codes ........................................................................................................................4
Errors ..................................................................................................................................................... 5
Error ................................................................................................................................................6
error .................................................................................................................................................7
Error Codes .....................................................................................................................................8
WordFilter APIs ................................................................................................................................... 10
POST CensorComment ................................................................................................................ 11
POST SanitizeComment ...............................................................................................................13
66
21
95
09
00
Document serial number: 000009952166
00
©SCEI
-2-
SCE CONFIDENTIAL
66
Common Features 21
95
09
00
Document serial number: 000009952166
00
©SCEI
-3-
SCE CONFIDENTIAL
Definition
66
503 Under maintenance, service has ended, etc.
Description
These are the HTTP status codes returned by the Word Filter Web APIs.
21
95
09
00
Document serial number: 000009952166
00
©SCEI
-4-
SCE CONFIDENTIAL
66
Errors 21
95
09
00
Document serial number: 000009952166
00
©SCEI
-5-
SCE CONFIDENTIAL
Error
Response body root object when errors occur
Definition
{
"error" : error object
}
Members
error Object that holds the error code and description
Description
66
This is the root object returned as the response body when an error occurs.
21
95
09
00
Document serial number: 000009952166
00
©SCEI
-6-
SCE CONFIDENTIAL
error
Object indicating error content
Definition
{
"code" : Number,
"message" : String
}
Members
code Error code. The value range is 2166784-2170879.
message Error message (in English) for debugging. Up to 128 ASCII characters.
66
Description
This object indicates the error code and error message when an error occurs.
21
Methods for displaying error messages for users with the error code returned to code are available for
each product type; refer to the "PlayStation™Network Web APIs Overview" document for details.
95
09
00
Document serial number: 000009952166
00
©SCEI
-7-
SCE CONFIDENTIAL
Error Codes
List of errors returned by the Word Filter Web APIs
Definition
66
2166787 Too large body Request body is too long
2166788 Invalid NP environment Environment name is invalid
2167040 Invalid query string Details are unknown, but an value in query
string is invalid
2167041 Invalid parameter in query string Query parameter value in query string is
(parameter: 'parameter_name') invalid
2167042
2167043
Invalid parameter combination in
query string (parameters:
'parameter1', 'parameter2'…)
Cannot use query string
('parameter=value') for the
21 Query parameter combination in query
string is invalid
2167169 Null value not allowed (parameter: A member with a null value in request
'parameter_name') body exists
Document serial number: 000009952166
©SCEI
-8-
SCE CONFIDENTIAL
66
2167309 Not authorized access token Access token was obtained with an invalid
procedure
2167310 Needs to upgrade for PSN access Access was performed with an account that
has not been upgraded
2167424 Unknown client Client ID for access token is invalid
2167552
message
Unexpected error
21
The following errors indicate that a server problem occurred.
code Description
Unexpected error
95
2167553 Internal server error Internal error of the server
2167554 Service temporarily unavailable Service has been temporarily stopped
2167555 Server busy Server overload
2167556 Authorization server error Authentication/authorization server error
2167616 Under maintenance Server is under maintenance
09
Notes
00
Implement programming so that processing can continue even if an error code not in this document
returns.
Document serial number: 000009952166
00
©SCEI
-9-
SCE CONFIDENTIAL
66
WordFilter APIs 21
95
09
00
Document serial number: 000009952166
00
©SCEI
- 10 -
SCE CONFIDENTIAL
POST CensorComment
Check for inappropriate strings
Request
URI
POST WordFilterBaseUrl/v1/censorComment
• WordFilterBaseUrl
Specify the base URL for the Word Filter Web APIs group.
Query parameters
None
66
Header
Content-Type: application/json; charset=utf-8
Authorization: Bearer AccessToken
• AccessToken
Specify the access token.
Request body
{
}
"comment" : String
21
95
comment Target UTF-8 string to check for. Up to 1024 characters.
Response
09
Upon error
Document serial number: 000009952166
The HTTP status code and response body that indicate one of the errors common to all APIs (refer to the
"Error Codes" section) will be returned.
00
Description
This API is for checking if a string input by a user contains inappropriate language or not. A UTF-8
encoded string is received and a boolean value that indicates whether the string is inappropriate or not
will return.
It is not necessary to check the strings in chat, etc. Check strings that will be seen by all players and will
remain for long periods of time. Note that the rules for language considered to be inappropriate may
change without notice.
©SCEI
- 11 -
SCE CONFIDENTIAL
Use Restrictions
It is recommended that the frequency by which this API is called be kept within 60 times/15 minutes.
Examples
Request
66
POST WordFilterBaseUrl/v1/censorComment
{
"comment":"This is an inappropriate string."
}
Response
{
}
"result":false 21
95
09
00
Document serial number: 000009952166
00
©SCEI
- 12 -
SCE CONFIDENTIAL
POST SanitizeComment
Correct inappropriate string
Request
URI
POST WordFilterBaseUrl/v1/sanitizeComment
• WordFilterBaseUrl
Specify the base URL for the Word Filter Web APIs group.
Query parameters
None
66
Header
Content-Type: application/json; charset=utf-8
Authorization: Bearer AccessToken
• AccessToken
Specify the access token.
Request body
{
}
"comment" : String
21
95
comment Target UTF-8 string to correct. Up to 1024 characters.
Response
09
If the specified comment does not include any inappropriate language, the result value will be true,
and the same string as the one in comment will return for the sanitizedComment value.
Document serial number: 000009952166
Upon error
The HTTP status code and response body that indicate one of the errors common to all APIs (refer to the
"Error Codes" section) will be returned.
00
Description
This API is for correcting a string that contains inappropriate language input by a user. A UTF-8
encoded string is received, and if inappropriate language is included, a string with that part censored
will return.
It is not necessary to check the strings in chat, etc. Check strings that will be seen by all players and will
remain for long periods of time. Note that the rules for language considered to be inappropriate may
change without notice.
This API returns the assigned strings in their original language without any changes (except for
censored inappropriate language), no matter the language. It is not possible to restrict the language of
the returned strings, even if an Accept-Language header is specified.
©SCEI
- 13 -
SCE CONFIDENTIAL
Use Restrictions
It is recommended that the frequency by which this API is called be kept within 30 times/15 minutes.
Examples
Request
POST WordFilterBaseUrl/v1/sanitizeComment
66
{
"comment":"This is an inappropriate string."
}
Response
{
}
"result":false,
21
"sanitizedComment":"This is an ********************."
95
09
00
Document serial number: 000009952166
00
©SCEI
- 14 -