Create OA authorization link

This API is used to get the OA authorization path for the application (app).

Note:

  • For APIs used for Shop, the API key is: <api_key>. The base_url information of the Shop.

  • For APIs used for Partner, the API key is: <shop_key>. The base_url information of the Partner.

AuthorizeOA

post
Body
app_idstring · int64Optional
app_secretstringOptional
redirect_uristringOptional
Responses
200
A successful response
application/json
post
POST /AuthorizeOA HTTP/1.1
Host: $BASE_URL.Zalo
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "app_id": "text",
  "app_secret": "text",
  "redirect_uri": "text"
}
200

A successful response

{
  "url": "text"
}

Request:

curl --location '$BASE_URL.Zalo/AuthorizeOA' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
  "app_id": "int64",
  "app_secret": "string",
  "redirect_uri": "string"
}'

Response:

{
  "url": "string"
}

Request body structure

Parameters
Data type
Describe

app_id

int64

Application ID

app_secret

string

Application secret key

redirects

string

The callback URL is set in "Official Account Callback Url" on the app https://developers.zalo.me/apps

Return data attribute structure

Parameters
Data type
Describe

url

string

OA authorization link for the application

Last updated