Endpoint | Description |
---|---|
POST /v1/access_tokens | Creates a new access token |
POST /v1/access_tokens/delete | Requests an access token deletion |
DELETE /v1/access_tokens | Deletes an access token |
Creates a new access token
Location | Name | Type | Required? | Description |
---|---|---|---|---|
body |
data
|
object | ✔️ | |
body |
data.type
|
string | ✔️ | Type of data. Must be "access_tokens". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.email_address
|
string | ✔️ | Email address to send access token to. |
Header:
POST /v1/access_tokens
Host: api.pkmnapi.com
Content-Type: application/json
Body:
{
"data": {
"type": "access_tokens",
"attributes": {
"email_address": "your@email.com"
}
}
}
Header:
HTTP/1.1 201 Created
Content-Type: application/json
Location: https://api.pkmnapi.com/v1/access_tokens
Server: pkmnapi/0.1.0
Body:
{}
Requests an access token deletion
Location | Name | Type | Required? | Description |
---|---|---|---|---|
body |
data
|
object | ✔️ | |
body |
data.type
|
string | ✔️ | Type of data. Must be "access_tokens". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.email_address
|
string | ✔️ | Email address to send access token delete confirmation to. |
Header:
POST /v1/access_tokens/delete
Host: api.pkmnapi.com
Content-Type: application/json
Body:
{
"data": {
"type": "access_tokens",
"attributes": {
"email_address": "your@email.com"
}
}
}
Header:
HTTP/1.1 201 Created
Content-Type: application/json
Location: https://api.pkmnapi.com/v1/access_tokens
Server: pkmnapi/0.1.0
Body:
{}
Deletes an access token
Location | Name | Type | Required? | Description |
---|---|---|---|---|
body |
data
|
object | ✔️ | |
body |
data.type
|
string | ✔️ | Type of data. Must be "access_tokens". |
body |
data.attributes
|
object | ✔️ | |
body |
data.attributes.code
|
string | ✔️ | Code sent to the user's email address. |
body |
data.attributes.email_address
|
string | ✔️ | Email address to delete access token for. |
Header:
DELETE /v1/access_tokens
Host: api.pkmnapi.com
Content-Type: application/json
Body:
{
"data": {
"type": "access_tokens",
"attributes": {
"code": "1337",
"email_address": "your@email.com"
}
}
}
Header:
HTTP/1.1 204 No Content
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
{}