---
schema_version: "1"
id: 946cf76ada598ce4428ba9fba8e24f554980fc714f8a5b4e061977dd8ce5ce24
title: AuthRequestResponse Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_RichMessaging_AuthRequestResponse.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_AuthRequestResponse.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2a43a26942672684970fed2240027bfd07c9e404e988a0df43fd8c6f86b5ee98
description: This class contains authorization request response data.Creates a new instance of the RichMessaging.AuthRequestResponse class.Gets the authorization access token.Get the authorization provider name.Gets the context record ID.
---
# AuthRequestResponse Class

This class contains authorization request response data.

## Namespace

[RichMessaging](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_RichMessaging.htm "Provides objects and methods for handling content in enhanced Messaging channels.")

- **[AuthRequestResponse Constructors](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_AuthRequestResponse.htm#apex_RichMessaging_AuthRequestResponse_constructors)**
- **[AuthRequestResponse Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_AuthRequestResponse.htm#apex_RichMessaging_AuthRequestResponse_methods)**

## AuthRequestResponse Constructors

The following are constructors for AuthRequestResponse.

- **[AuthRequestResponse(accessToken, contextRecordId, authProviderName)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_AuthRequestResponse.htm#apex_RichMessaging_AuthRequestResponse_ctor)**  
    Creates a new instance of the RichMessaging.AuthRequestResponse class.

### AuthRequestResponse(accessToken, contextRecordId, authProviderName)

Creates a new instance of the RichMessaging.AuthRequestResponse class.

#### Signature

public AuthRequestResponse(String accessToken, String contextRecordId, String authProviderName)

#### Parameters

- **accessToken**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.") The authorization access token.
- **contextRecordId**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.") The context record ID.
- **authProviderName**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.") The provider name.

## AuthRequestResponse Methods

The following are methods for AuthRequestResponse.

- **[getAccessToken()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_AuthRequestResponse.htm#apex_RichMessaging_AuthRequestResponse_getAccessToken)**  
    Gets the authorization access token.
- **[getAuthProviderName()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_AuthRequestResponse.htm#apex_RichMessaging_AuthRequestResponse_getAuthProviderName)**  
    Get the authorization provider name.
- **[getContextRecordId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_RichMessaging_AuthRequestResponse.htm#apex_RichMessaging_AuthRequestResponse_getContextRecordId)**  
    Gets the context record ID.

### getAccessToken()

Gets the authorization access token.

#### Signature

public String getAccessToken()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

The access token.

### getAuthProviderName()

Get the authorization provider name.

#### Signature

public String getAuthProviderName()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

The authorization provider name.

### getContextRecordId()

Gets the context record ID.

#### Signature

public String getContextRecordId()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

The context record ID.