OAuth2.0 Learning (5-2) Sina open platform-licensing of Weibo Api-web website

Source: Internet
Author: User

1. Boot the user who needs authorization to the following address:

Url
1 https://api.weibo.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=YOUR_REGISTERED_REDIRECT_URI

2. If the user agrees to authorize, the page jumps to Your_registered_redirect_uri/?code=code

3. In exchange for access Token

Url
1 https://api.weibo.com/oauth2/access_token?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=authorization_code&redirect_uri=YOUR_REGISTERED_REDIRECT_URI&code=CODE

Where Client_id=your_client_id&client_secret=your_client_secret can be added to the header using the basic method, the return value

Json
12345 {    "access_token""SlAV32hkKG",    "remind_in": 3600,    "expires_in": 3600}

4. Invoking the API using the obtained access token

OAuth2.0 Learning (5-2) Sina open platform-licensing of Weibo Api-web website

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.