Skip to main content

Basic authentication

X의 많은 엔터프라이즈 API는 HTTP Basic Authentication 사용을 요구합니다. Basic Authentication이 필요한 API에 성공적으로 요청을 보내려면 유효한 이메일 주소와 비밀번호 조합을 각 요청의 인증 헤더로 전달해야 합니다. 이 이메일과 비밀번호 조합은 엔터프라이즈 API 콘솔에 액세스할 때 사용하는 것과 동일하며 이 콘솔 내에서 편집할 수 있습니다. Basic Authentication을 사용해 요청을 빌드할 때는 HTTPS를 통해 인코딩된 자격 증명과 함께 Authentication: Basic HTTP 헤더를 추가하세요. 다음 cURL 요청 예시에서는 요청을 보내기 전에 <email_address><password>를 자격 증명으로 교체합니다:
curl -v --compressed -u<email_address>:<password>
    "https://gnip-api.x.com/search/30day/accounts/<account-name>/prod/counts.json?query=from%3Axdevelopers"
basic authentication이 필요한 API: