Skip to content

Commit

Permalink
Fix UserDTO Link
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoGing authored Feb 15, 2023
1 parent b2b5c8d commit 10e3020
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const authRes = await window.Pi.authenticate(scopes, onIncompletePaymentFound);
```

### 2. Make a GET request to `/me` Pi API endpoint using the access token for verification
To verify the data you got in step 1, you need to make a GET request to `/me` Pi API endpoint, with the access token included in the header. If the access token is valid, it will return a response with [UserDTO](./platform_API#UserDTO). However, if the token is invalid, it will return HTTP 401 Unauthorized code.
To verify the data you got in step 1, you need to make a GET request to `/me` Pi API endpoint, with the access token included in the header. If the access token is valid, it will return a response with [UserDTO](./platform_API.md#UserDTO). However, if the token is invalid, it will return HTTP 401 Unauthorized code.
```javascript
const me = await axios.get('https://api.minepi.com/v2/me', {headers: {'Authorization': `Bearer ${accessToken}}});
```
```

0 comments on commit 10e3020

Please sign in to comment.