Access Tokens - Get
Exchange ACR Refresh token for an ACR Access Token
POST {url}/oauth2/token
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
grant_type
|
formData | True |
string |
Grant type is expected to be refresh_token |
refresh_token
|
formData | True |
string |
Must be a valid ACR refresh token |
scope
|
formData | True |
string |
Which is expected to be a valid scope, and can be specified more than once for multiple scope requests. You obtained this from the Www-Authenticate response header from the challenge. |
service
|
formData | True |
string |
Indicates the name of your Azure container registry. |
url
|
path | True |
string |
Registry login URL |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Access token acquired |
|
Other Status Codes |
ACR error response describing why the operation failed. |
Examples
Get Access Token with Refresh Token
Sample Request
POST acrapi.azurecr-test.io/oauth2/token
Sample Response
{
"access_token": "eyJ0eXAiOiJKJhbGcigdCI6IkN0ZlFaOExlLTMejlnIiwidGlkIjoiNzbmOTgWItMmQ3Y2QwMTFkYjQ3Ii..."
}
Definitions
Name | Description |
---|---|
Access |
|
Acr |
Error information |
Acr |
Acr error response describing why the operation failed |
AccessToken
Name | Type | Description |
---|---|---|
access_token |
string |
The access token for performing authenticated requests |
AcrErrorInfo
Error information
Name | Type | Description |
---|---|---|
code |
string |
Error code |
detail |
object |
Error details |
message |
string |
Error message |
AcrErrors
Acr error response describing why the operation failed
Name | Type | Description |
---|---|---|
errors |
Array of detailed error |