staff
2,096
edits
Line 151: | Line 151: | ||
== Authing Commands == | == Authing Commands == | ||
{{eyecatch|NOTE:| | {{eyecatch|NOTE:| '''ANY''' command which requires parameters may return: 505 ILLEGAL INPUT OR ACCESS DENIED}} | ||
}} | |||
---- | ---- | ||
Line 172: | Line 171: | ||
'''Info:''' | '''Info:''' | ||
{{eyecatch|NOTE:| The password is the normal AniDB website password! The password listed in the profile as API Password in only used for the optional encryption feature.}} | {{eyecatch|NOTE:|The password is the normal AniDB website password! The password listed in the profile as API Password in only used for the optional encryption feature.}} | ||
* The ''session_key'' is a String containing only ''a-z,A-Z,0-9'' chars of a length of ''4-8'' characters. | * The ''session_key'' is a String containing only ''a-z,A-Z,0-9'' chars of a length of ''4-8'' characters. | ||
: It has to be stored by the client and needs to be sent as parameter with every command which requires the user to logged in. | : It has to be stored by the client and needs to be sent as parameter with every command which requires the user to logged in. | ||
Line 192: | Line 191: | ||
{{eyecatch|IMPORTANT:| | {{eyecatch|IMPORTANT:| | ||
* DO NOT use the clientname of another existing client. | * DO NOT use the clientname of another existing client. | ||
* ALWAYS increase the clientversion number if you release a new client version. | * ALWAYS increase the clientversion number if you release a new client version.}} | ||
}} | |||
* A Login and its assigned ''session_key'' is valid until the virtual UDP connection times out or until a LOGOUT command is issued. | * A Login and its assigned ''session_key'' is valid until the virtual UDP connection times out or until a LOGOUT command is issued. | ||
* The virtual UDP connection times out if no data was recieved from the client for '''35 minutes'''. | * The virtual UDP connection times out if no data was recieved from the client for '''35 minutes'''. | ||
Line 200: | Line 198: | ||
* If it is very likely that another command will be issued shortly (within the next 20 minutes) a client SHOULD keep the current connection open, by not sending a LOGOUT command. | * If it is very likely that another command will be issued shortly (within the next 20 minutes) a client SHOULD keep the current connection open, by not sending a LOGOUT command. | ||
{{eyecatch|IMPORTANT:| | {{eyecatch|IMPORTANT:| | ||
* A client shout NOT perform a full AUTH / command / LOGOUT cycle for each command it wants to send. Again, if another command is likely within 20 minutes, remain logged in. | * A client shout NOT perform a full AUTH / command / LOGOUT cycle for each command it wants to send. Again, if another command is likely within 20 minutes, remain logged in.}} | ||
}} | |||
* The client shall notify the user if it recieved a 201 message at login. | * The client shall notify the user if it recieved a 201 message at login. | ||
: This means a new version of the client is available, however the old version is still supported otherwise a client banned message would have been returned. | : This means a new version of the client is available, however the old version is still supported otherwise a client banned message would have been returned. | ||
Line 207: | Line 204: | ||
: (NOTE: 504 means that this version of the client is banned, not the user!) | : (NOTE: 504 means that this version of the client is banned, not the user!) | ||
* The 'nat' option makes the client able to detect whether it is behind a nat router or not. When the client is behind a nat router it should keep the "connection" alive with the PING command. | * The 'nat' option makes the client able to detect whether it is behind a nat router or not. When the client is behind a nat router it should keep the "connection" alive with the PING command. | ||
{{eyecatch|IMPORTANT:| Make sure your client handels ALL possible AUTH return codes before giving out any versions!}} | {{eyecatch|IMPORTANT:|Make sure your client handels ALL possible AUTH return codes before giving out any versions!}} | ||
* When ''enc=x'' is defined the server will change the encoding used to x. | * When ''enc=x'' is defined the server will change the encoding used to x. | ||
**If the encoding is supported it will change right away (including the response) and be reset on logout/timeout. | **If the encoding is supported it will change right away (including the response) and be reset on logout/timeout. | ||
Line 254: | Line 251: | ||
* The encryption key is md5(api_password_of_user+''salt''). | * The encryption key is md5(api_password_of_user+''salt''). | ||
* Padding of the message needs to be done according to the PKCS5Padding scheme. | * Padding of the message needs to be done according to the PKCS5Padding scheme. | ||
== Notify Commands == | == Notify Commands == |