iOS 응용 프로그램에 Google URL-Shorten API
을 테스트 목적으로 통합했습니다. 내 앱 번들 ID가 Authorized iOS Applications
목록에 나에게 추가되어 요청을 보냅니다. 내가 NSURLRequest
를 사용하여 HTTP
POST
요청을 보낼 때마다accessNotConfigured : Google URL iOS 시뮬레이터의 API 단축
, 나는 응답 JSON
에 다음과 같은 오류가 발생합니다 :
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration.",
"extendedHelp": "https://console.developers.google.com"
}
],
"code": 403,
"message": "Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration."
}
}
나는이 문제를 해결하는 방법을 알아낼 수 없습니다. 내가 만든 하나의 추측이 오류가 제대로에 대한 액세스를 구성하지 않은 상태로 내 생각을 참조하여 지원
은 API 문서에서
If your application accesses APIs directly from iOS, you will need the application's Bundle ID and (optionally) its Apple App Store ID:
The application's Bundle ID is the bundle identifier as listed in the app's .plist file. For example: com.example.myapp.
The application's App Store ID is in the app's iTunes URL so long as the app was published in the Apple iTunes App Store. For example, in the app URL http://itunes.apple.com/us/app/google+/id447119634, the App Store ID is 447119634.
그냥 작동합니다! – Dashrath