---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideOAuthClientResponse - Scoped, Global

# GlideOAuthClientResponse - Scoped, Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The GlideOAuthClientResponse API provides methods for handling OAuth
client responses.

You can use this API in global and scoped scripts. In scoped scripts use the `sn_auth` namespace identifier.

## GlideOAuthClientResponse - getBody() {#ariaid-title2}

Retrieves all of the response information, including instance information.
{#r_GlideOAuthClientResponseGetBody__table_qc4_bzf_cr__entry__3}

| Name | Type | Description |
|-|-|-|
| none |   |   |
[Table 1. Parameters]

{#r_GlideOAuthClientResponseGetBody__table_qc4_bzf_cr} {#r_GlideOAuthClientResponseGetBody__table_rc4_bzf_cr__entry__2}

| Type | Description |
|-|-|
| String | The response information. |
[Table 2. Returns]

{#r_GlideOAuthClientResponseGetBody__table_rc4_bzf_cr}

## GlideOAuthClientResponse - getContentType() {#ariaid-title3}

Retrieves the HTTP response content header from an external OAuth provider.
{#r_GOACRP-GetContentType__table_qc4_bzf_cr__entry__3}

| Name | Type | Description |
|-|-|-|
| none |   |   |
[Table 3. Parameters]

{#r_GOACRP-GetContentType__table_qc4_bzf_cr} {#r_GOACRP-GetContentType__table_rc4_bzf_cr__entry__2}

| Type | Description |
|-|-|
| String | The HTTP response header. |
[Table 4. Returns]

{#r_GOACRP-GetContentType__table_rc4_bzf_cr}

## GlideOAuthClientResponse - getErrorMessage() {#ariaid-title4}

Retrieves the error message if authentication is not successful.
{#r_GOACRP-GetErrorMessage__table_qc4_bzf_cr__entry__3}

| Name | Type | Description |
|-|-|-|
| none |   |   |
[Table 5. Parameters]

{#r_GOACRP-GetErrorMessage__table_qc4_bzf_cr} {#r_GOACRP-GetErrorMessage__table_rc4_bzf_cr__entry__2}

| Type | Description |
|-|-|
| String | The error message. |
[Table 6. Returns]

{#r_GOACRP-GetErrorMessage__table_rc4_bzf_cr}

## GlideOAuthClientResponse - getResponseCode() {#ariaid-title5}

Retrieves the HTTP response code from the external OAuth provider.
{#r_GOACRP-GetResponseCode__table_qc4_bzf_cr__entry__3}

| Name | Type | Description |
|-|-|-|
| none |   |   |
[Table 7. Parameters]

{#r_GOACRP-GetResponseCode__table_qc4_bzf_cr} {#r_GOACRP-GetResponseCode__table_rc4_bzf_cr__entry__2}

| Type | Description |
|-|-|
| String | The HTTP response code. |
[Table 8. Returns]

{#r_GOACRP-GetResponseCode__table_rc4_bzf_cr}

## GlideOAuthClientResponse - getResponseParameters() {#ariaid-title6}

Retrieves the error message if authentication is not successful.
{#r_GOACRP-GetResponseParameters__table_qc4_bzf_cr__entry__3}

| Name | Type | Description |
|-|-|-|
| none |   |   |
[Table 9. Parameters]

{#r_GOACRP-GetResponseParameters__table_qc4_bzf_cr} {#r_GOACRP-GetResponseParameters__table_rc4_bzf_cr__entry__2}

| Type | Description |
|-|-|
| MapString | The response content. |
[Table 10. Returns]

{#r_GOACRP-GetResponseParameters__table_rc4_bzf_cr}

## GlideOAuthClientResponse - getToken() {#ariaid-title7}

Retrieves the refresh token.
{#r_GlideOAuthClientResponseGetToken__table_qc4_bzf_cr__entry__3}

| Name | Type | Description |
|-|-|-|
| none |   |   |
[Table 11. Parameters]

{#r_GlideOAuthClientResponseGetToken__table_qc4_bzf_cr} {#r_GlideOAuthClientResponseGetToken__table_rc4_bzf_cr__entry__2}

| Type | Description |
|-|-|
| GlideOAuthToken | The refresh token. |
[Table 12. Returns]

{#r_GlideOAuthClientResponseGetToken__table_rc4_bzf_cr}

