noknok.in.th API #02 Authen

คราวนี้มาลองใช้งาน API ของ noknok.in.th กันบ้าง
เริ่มด้วยสิ่งที่จำเป็นต้องใช้ในครั้งนี้ (เฉพาะวิธีของผม) ก็คือ
1.Account ของ noknok.in.th
2.Server ที่ใช้งาน PHP และ DOM ได้ (ความจริงไม่ต้อง DOM ก็ได้ครับ แต่บังเอิญผมเริ่มด้วยเจ้านี่ ก็ขอแสดงด้วยเจ้า DOM นี่แหล่ะครับ)

เริ่มกันเลยนะครับ ตามที่ noknok.in.th เข้ามีคำแนะนำให้ที่ http://en.wikipedia.org/wiki/User:Noknokdev (API ของเค้าให้ใช้ผ่าน REST protocol ซึ่งมี link ให้ไปศึกษากันเองอยู่แล้ว)

อันดับแรกก็ลองงานกลุ่มของ Account Methods เริ่มด้วย

Authen
URL: http://api.noknok.in.th/rest/auth
Format: xml
Method(s): GET, POST
Parameters:
* username (required)
* password (required)
Return:
* authToken

ลองคลิกเข้าไปดูก็จะได้ popup สำหรับ login
noknok_api_auth1

และถ้าป้อน username และ password ถูกต้องก็จะได้ผล ดังรูป
noknok_api_auth_ok


Written by Komkid on February 18th, 2009 with no comments.
Read more articles on Internet and Programming.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:

You have to be identified to write a comment.