> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblAchievementsGetAchievementsForTitleIdAsync

> XblAchievementsGetAchievementsForTitleIdAsync

# XblAchievementsGetAchievementsForTitleIdAsync

Gets the first page of achievements for a player of the specified title.

## Syntax

```cpp theme={null}
HRESULT XblAchievementsGetAchievementsForTitleIdAsync(  
         XblContextHandle xboxLiveContext,  
         uint64_t xboxUserId,  
         uint32_t titleId,  
         XblAchievementType type,  
         bool unlockedOnly,  
         XblAchievementOrderBy orderBy,  
         uint32_t skipItems,  
         uint32_t maxItems,  
         XAsyncBlock* async  
)  
```

### Parameters

*xboxLiveContext*   \_In\_\
Type: [XblContextHandle](/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

An xbox live context handle created with XblContextCreateHandle.

*xboxUserId*   \_In\_\
Type: uint64\_t

The XBOX User ID of the player.

*titleId*   \_In\_\
Type: uint32\_t

The title ID.

*type*   \_In\_\
Type: [XblAchievementType](/reference/live/xsapi-c/achievements_c/enums/xblachievementtype)

The achievement type to retrieve.

*unlockedOnly*   \_In\_\
Type: bool

Indicates whether to return unlocked achievements only.

*orderBy*   \_In\_\
Type: [XblAchievementOrderBy](/reference/live/xsapi-c/achievements_c/enums/xblachievementorderby)

Controls how the list of achievements is ordered.

*skipItems*   \_In\_\
Type: uint32\_t

The number of achievements to skip.

*maxItems*   \_In\_\
Type: uint32\_t

The maximum number of achievements the result can contain. Pass 0 to attempt to retrieve all items.

*async*   \_In\_\
Type: XAsyncBlock\*

Caller allocated AsyncBlock.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

To get the result, call [XblAchievementsGetAchievementsForTitleIdResult](/reference/live/xsapi-c/achievements_c/functions/xblachievementsgetachievementsfortitleidresult) inside the AsyncBlock callback or after the AsyncBlock is complete.

## REST Call

V2 GET /users/xuid({xuid})/achievements

## Requirements

**Header:** achievements\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[achievements\_c](/reference/live/xsapi-c/achievements_c/achievements_c_members)


## Related topics

- [Getting title-managed Achievements](/services/xbox-services/player-data/achievements/title-managed/how-to/live-how-to-get-achievements.md)
- [XblAchievementsGetAchievementsForTitleIdResult](/reference/live/xsapi-c/achievements_c/functions/xblachievementsgetachievementsfortitleidresult.md)
- [XblAchievementType](/reference/live/xsapi-c/achievements_c/enums/xblachievementtype.md)
- [XblAchievementOrderBy](/reference/live/xsapi-c/achievements_c/enums/xblachievementorderby.md)
- [Stats and achievements](/build/steam-porting-guide/features/stats-and-achievements.md)
