Referensi respons error HTTP OAuth

Halaman ini berlaku untuk Apigee dan Apigee hybrid.

Lihat dokumentasi Apigee Edge.

Topik ini memberikan kode status HTTP dan frasa alasan terkait yang mungkin Anda temui saat kebijakan OAuth menampilkan error di Apigee.

Untuk panduan penanganan error, lihat Menangani error.

Untuk kode error khusus kebijakan, lihat referensi error kebijakan OAuth v2.

Kode Otorisasi

URI Pengalihan Tidak Valid

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Invalid redirection uri http://www.invalid_example.com"}

Tidak Ada URI Pengalihan

HTTP/1.1 400 Bad Request {"ErrorCode" : "invalid_request", "Error" :"Redirection URI is required"}

Kunci Tidak Valid

HTTP/1.1 401 Unauthorized {"ErrorCode" : "invalid_request", "Error" :"Invalid client id : AVD7ztXReEYyjpLFkkPiZpLEjeF2aYAz. ClientId is Invalid"}

Kunci Tidak Ada

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"The request is missing a required parameter : client_id"}

Jenis Respons Tidak Valid

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Response type must be code"}

Jenis Respons Tidak Ada

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"The request is missing a required parameter : response_type"}

Membuat AccessToken

Kode Autentikasi Tidak Valid

HTTP status: 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Invalid Authorization Code"}

Tidak Ada URI Pengalihan

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Required param : redirect_uri"}

URI Pengalihan Tidak Valid

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Invalid redirect_uri : oob"}

Client ID tidak valid saat GenerateResponse bernilai salah

Error ini ditampilkan saat properti <GenerateResponse> ditetapkan ke false dan kredensial klien tidak valid.

{
    "fault": {
        "faultstring": "Invalid client identifier {0}",
        "detail": {
            "errorcode": "oauth.v2.InvalidClientIdentifier"
        }
    }
}

Client ID tidak valid saat GenerateResponse bernilai benar

Error ini ditampilkan saat properti <GenerateResponse> ditetapkan ke true dan kredensial klien tidak valid.

{"ErrorCode" : "invalid_client", "Error" :"ClientId is Invalid"}

GrantType tidak valid

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Unsupported grant type : client_credentials_invalid"}

Tidak Ada Nama Pengguna

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Required param : username"}

Tanpa Sandi

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Required param : password"}

Tidak ada GrantType (Kebijakan Kustom)

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Required param : grant_type"}

Tidak ada AuthCode

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Required param : code"} 

Implisit

Client ID Tidak Valid

HTTP/1.1 401 Unauthorized
{"ErrorCode" : "invalid_request", "Error" :"Invalid client id : AVD7ztXReEYyjpLFkkPiZpLEjeF2aYAz. ClientId is Invalid"}

Tidak ada Client ID

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"The request is missing a required parameter : client_id"}

Jenis Respons Tidak Valid

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Response type must be token"}

Tidak Ada Jenis Respons

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"The request is missing a required parameter : response_type"}

URI Pengalihan Tidak Valid

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Invalid redirection uri http://www.invalid_example.com"}

Tidak Ada URI Pengalihan

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Redirection URI is required"}

Token Refresh

RefreshToken Tidak Valid

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Invalid Refresh Token"}

RefreshToken yang Sudah Tidak Berlaku

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Refresh Token expired"}

Cakupan Tidak Valid

HTTP/1.1 400 Bad Request
{"ErrorCode" : "invalid_request", "Error" :"Invalid Scope"}

Client ID tidak valid saat GenerateResponse bernilai salah

Error ini ditampilkan saat properti GenerateResponse ditetapkan ke false dan kredensial klien tidak valid.

{
    "fault": {
        "faultstring": "Invalid client identifier {0}",
        "detail": {
            "errorcode": "oauth.v2.InvalidClientIdentifier"
        }
    }
}

Client ID tidak valid saat GenerateResponse bernilai benar

Error ini ditampilkan saat properti GenerateResponse ditetapkan ke true dan kredensial klien tidak valid.

{"ErrorCode" : "invalid_client", "Error" :"ClientId is Invalid"}

Memverifikasi AccessToken

AccessToken Tidak Valid

HTTP/1.1 401 Unauthorized
{"fault":{"faultstring":"Invalid Access Token","detail":{"errorcode":"keymanagement.service.invalid_access_token"}}}

Resource Tidak Valid

HTTP/1.1 401 Unauthorized
{"fault":{"faultstring":"APIResource \/facebook\/acer does not exist","detail":{"errorcode":"keymanagement.service.apiresource_doesnot_exist"}}}

Cakupan Tidak Valid

HTTP/1.1 403 Forbidden
{"fault":{"faultstring":"Required scope(s) : VerifyAccessToken.scopeSet","detail":{"errorcode":"steps.oauth.v2.InsufficientScope"}}}

Tidak Ada Header Autentikasi

HTTP/1.1 401 Unauthorized
{"fault":{"faultstring":"Invalid access token","detail":{"errorcode":"oauth.v2.InvalidAccessToken"}}}

Tidak ada kecocokan untuk ApiProduct (Dengan Env & Proxy Dikonfigurasi)

HTTP/1.1 401 Unauthorized
{"fault":{"faultstring":"Invalid API call as no apiproduct match found","detail":{"errorcode":"keymanagement.service.InvalidAPICallAsNoApiProductMatchFound"}}}

Masa berlaku token akses telah berakhir

HTTP/1.1 401 Unauthorized
{"fault":{"faultstring":"Access Token expired","detail":{"errorcode":"keymanagement.service.access_token_expired"}}} 

Token akses dicabut

HTTP/1.1 401 Unauthorized
{"fault":{"faultstring":"Access Token not approved","detail":{"errorcode":"keymanagement.service.access_token_not_approved"}}}

Mendapatkan Info OAuth V2

Token Refresh Tidak Valid

HTTP/1.1 404 Not Found
{"fault::{"detail":{"errorcode":"keymanagement.service.invalid_refresh_token"},"faultstring":"Invalid Refresh Token"}}

Token Akses Tidak Valid

HTTP/1.1 404 Not Found
{
  "fault": {
    "faultstring": "Invalid Access Token",
    "detail": {
      "errorcode": "keymanagement.service.invalid_access_token"
    }
  }
}

Token Akses yang Sudah Habis Masa Berlakunya

HTTP/1.1 500 Not Found
{
  "fault": {
    "faultstring": "Access Token expired",
    "detail": {
      "errorcode": "keymanagement.service.access_token_expired"
    }
  }
}

Token Refresh yang Sudah Habis Masa Berlakunya

HTTP/1.1 500 Not Found
{
  "fault": {
    "faultstring": "Refresh Token expired",
    "detail": {
      "errorcode": "keymanagement.service.refresh_token_expired"
    }
  }
}

Client ID Tidak Valid

HTTP/1.1 404 Not Found
{
  "fault": {
    "faultstring": "Invalid Client Id",
    "detail": {
      "errorcode": "keymanagement.service.invalid_client-invalid_client_id"
    }
  }
}

Kode Otorisasi Tidak Valid

HTTP/1.1 404 Not Found
{
  "fault": {
    "faultstring": "Invalid Authorization Code",
    "detail": {
      "errorcode": "keymanagement.service.invalid_request-authorization_code_invalid"
    }
  }
}

Kode Otorisasi Tidak Berlaku

HTTP/1.1 500 Not Found
{
  "fault": {
    "faultstring": "Authorization Code expired",
    "detail": {
      "errorcode": "keymanagement.service.authorization_code_expired"
    }
  }
}

Menetapkan Info OAuth V2

Token Akses Tidak Valid

HTTP/1.1 404 Not Found
{
  "fault": {
    "faultstring": "Invalid Access Token",
    "detail": {
      "errorcode": "keymanagement.service.invalid_access_token"
    }
  }
}

Token Akses yang Sudah Habis Masa Berlakunya

HTTP/1.1 500 Not Found
{
  "fault": {
    "faultstring": "Access Token expired",
    "detail": {
      "errorcode": "keymanagement.service.access_token_expired"
    }
  }
}

Menghapus Info OAuth V2

Jika berhasil, kebijakan akan menampilkan status 200.

Jika gagal, kebijakan akan menampilkan 404 dan output yang mirip dengan berikut ini (bergantung pada apakah Anda menghapus token akses atau kode autentikasi):

HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 144
Connection: keep-alive

{"fault":{"faultstring":"Invalid Authorization Code","detail":{"errorcode":"keymanagement.service.invalid_request-authorization_code_invalid"}}}