Skip to content

Commit

Permalink
Add notes about Bearer tokens in missing OAuth endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbmaier committed Feb 19, 2024
1 parent 5305afb commit 5a03d96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/oauth/reference/accounts/id-to-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,28 @@ Retrieves the account name for a given `accountId`.
---

**Remarks**:

- To convert more than one ID at a time, you can send an array of values instead of a single value - see the second example below.
- The access token has to be provided in the `Authorization` header in the format `Bearer <token>`.

---

**Example request**:

```plain
GET https://api.trackmania.com/api/display-names?accountId[]=5b4d42f4-c2de-407d-b367-cbff3fe817bc
```

**Example response**:

```json
{
"5b4d42f4-c2de-407d-b367-cbff3fe817bc": "tooInfinite"
}
```

To retrieve more than one name at once, send the `accountId` values as follows:

```plain
GET https://api.trackmania.com/api/display-names?accountId[]=5b4d42f4-c2de-407d-b367-cbff3fe817bc&accountId[]=4c803b5a-a344-4d5c-a358-d8f7455d6c85
```
5 changes: 5 additions & 0 deletions docs/oauth/reference/accounts/name-to-id.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,28 @@ Retrieves the `accountId` for a given account name.
---

**Remarks**:

- To convert more than one name at a time, you can send an array of values instead of a single value - see the second example below.
- The access token has to be provided in the `Authorization` header in the format `Bearer <token>`.

---

**Example request**:

```plain
GET https://api.trackmania.com/api/display-names/account-ids?displayName[]=tooInfinite
```

**Example response**:

```json
{
"tooInfinite": "5b4d42f4-c2de-407d-b367-cbff3fe817bc"
}
```

To retrieve more than one ID at once, send the `accountName` values as follows:

```plain
GET https://api.trackmania.com/api/display-names/account-ids?displayName[]=tooInfinite&displayName[]=Nsgr
```

0 comments on commit 5a03d96

Please sign in to comment.