- Index - API Documentation
- Parameters - API Parameter Details
- Profiles - Manage user profiles
- Resources - Manage resources
- Rules - Manage the ACRs for resources
- EML - Manage EML documents and associated ACRs
- Groups - Manage groups and group members
- Search - Search for profiles and groups
- Tokens and API keys - Manage tokens and API keys
POST /auth/v1/token/refresh
Validate and refresh PASTA and EDI authentication tokens. A refreshed token matches the original but has a new TTL. The EDI token is considered authoritative — the PASTA token is refreshed even if it has expired, as long as the EDI token is still valid.
Note: This method is optimized for high traffic. It works directly with the tokens and does not query the database, LDAP, or the OAuth2 IdPs.
Required permission: Both a valid pasta-token and edi-token are required.
| Parameter | In | Required | Description |
|---|---|---|---|
pasta-token |
JSON body | Yes | Current PASTA authentication token |
edi-token |
JSON body | Yes | Current EDI authentication token |
| Status | Description |
|---|---|
200 OK |
Tokens refreshed successfully |
400 Bad Request |
See Parameters |
401 Unauthorized |
One or both tokens are invalid or expired |
403 Forbidden |
See Parameters |
200 OK response body:
| Field | Description |
|---|---|
method |
"getTokenByKey" |
msg |
"PASTA and EDI tokens refreshed successfully" |
pasta-token |
Refreshed PASTA token |
edi-token |
Refreshed EDI token |
Request:
curl -X POST https://auth.edirepository.org/auth/v1/token/refresh \
-d '{
"pasta-token": "uid=EDI,o=EDI,dc=edirepository...",
"edi-token": "eyJhbGciOiJFUzI1NiIsInR5cCI6I..."
}'Response 200 OK:
{
"method": "getTokenByKey",
"msg": "PASTA and EDI tokens refreshed successfully",
"pasta-token": "uid=EDI,o=EDI,dc=edirepository...",
"edi-token": "eyJhbGciOiJFUzI1NiIsInR5cCI6I..."
}POST /auth/v1/key
Retrieve an authentication token using an API key.
Required permission: None.
| Parameter | In | Required | Description |
|---|---|---|---|
key |
JSON body | Yes | API key |
| Status | Description |
|---|---|
200 OK |
Token created successfully |
400 Bad Request |
See Parameters |
401 Unauthorized |
API key is invalid or expired |
403 Forbidden |
See Parameters |
200 OK response body:
| Field | Description |
|---|---|
method |
"getTokenByKey" |
msg |
"Token created successfully" |
edi-token |
The new authentication token |
Request:
curl -X POST https://auth.edirepository.org/auth/v1/key \
-d '{"key": "R9arQwYMFqdgVVYt7jqcsxfyPyU"}'Response 200 OK:
{
"method": "getTokenByKey",
"msg": "Token created successfully",
"edi-token": "eyJhbGciOiJFUzI1NiIsInR5cCI6I..."
}